Commit b2831b11 authored by heyubin's avatar heyubin

add by hyb for lint

parent d6ca975e
...@@ -382,10 +382,9 @@ func (a *action) MultiSigConfirmTx(ConfirmTx *mty.MultiSigConfirmTx) (*types.Rec ...@@ -382,10 +382,9 @@ func (a *action) MultiSigConfirmTx(ConfirmTx *mty.MultiSigConfirmTx) (*types.Rec
} else if multiSigTx.TxType == mty.TransferOperate { } else if multiSigTx.TxType == mty.TransferOperate {
transfer := payload.GetMultiSigExecTransferFrom() transfer := payload.GetMultiSigExecTransferFrom()
return a.executeTransferTx(multiSigAcc, multiSigTx, transfer, owner, mty.IsConfirm) return a.executeTransferTx(multiSigAcc, multiSigTx, transfer, owner, mty.IsConfirm)
} else { }
multisiglog.Error("MultiSigConfirmTx:GetMultiSigTx", "multiSigAccAddr", multiSigAccAddr, "Confirm TxId", ConfirmTx.TxId, "TxType unknown", multiSigTx.TxType) multisiglog.Error("MultiSigConfirmTx:GetMultiSigTx", "multiSigAccAddr", multiSigAccAddr, "Confirm TxId", ConfirmTx.TxId, "TxType unknown", multiSigTx.TxType)
return nil, mty.ErrTxTypeNoMatch return nil, mty.ErrTxTypeNoMatch
}
} }
//多重签名账户请求权重的修改,返回新的KeyValue对和ReceiptLog信息 //多重签名账户请求权重的修改,返回新的KeyValue对和ReceiptLog信息
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package executor package executor
import ( import (
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package executor package executor
import ( import (
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package executor package executor
import ( import (
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package executor package executor
import ( import (
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package executor package executor
/* /*
...@@ -901,10 +902,7 @@ func isConfirmed(requiredWeight uint64, multiSigTx *mty.MultiSigTx) bool { ...@@ -901,10 +902,7 @@ func isConfirmed(requiredWeight uint64, multiSigTx *mty.MultiSigTx) bool {
for _, owner := range multiSigTx.ConfirmedOwner { for _, owner := range multiSigTx.ConfirmedOwner {
totalweight += owner.Weight totalweight += owner.Weight
} }
if totalweight >= requiredWeight { return totalweight >= requiredWeight
return true
}
return false
} }
//确认某笔交易的额度是否满足每日限额,返回是否满足,以及新的newLastDay时间 //确认某笔交易的额度是否满足每日限额,返回是否满足,以及新的newLastDay时间
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package executor package executor
import ( import (
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package executor package executor
import ( import (
...@@ -154,8 +155,7 @@ func (m *MultiSig) Query_MultiSigTxids(in *mty.ReqMultiSigTxids) (types.Message, ...@@ -154,8 +155,7 @@ func (m *MultiSig) Query_MultiSigTxids(in *mty.ReqMultiSigTxids) (types.Message,
multisiglog.Error("Query_MultiSigTxids:getMultiSigTx", "addr", addr, "txid", txid, "err", err) multisiglog.Error("Query_MultiSigTxids:getMultiSigTx", "addr", addr, "txid", txid, "err", err)
continue continue
} }
var findTxid uint64 findTxid := txid
findTxid = txid
//查找Pending/Executed的交易txid //查找Pending/Executed的交易txid
if in.Pending && !multiSigTx.Executed || in.Executed && multiSigTx.Executed { if in.Pending && !multiSigTx.Executed || in.Executed && multiSigTx.Executed {
multiSigTxids.Txids = append(multiSigTxids.Txids, findTxid) multiSigTxids.Txids = append(multiSigTxids.Txids, findTxid)
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package rpc_test package rpc_test
import ( import (
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package rpc package rpc
import ( import (
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package rpc package rpc
import ( import (
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package types package types
import ( import (
...@@ -12,6 +13,7 @@ import ( ...@@ -12,6 +13,7 @@ import (
var multisiglog = log15.New("module", "execs.multisig") var multisiglog = log15.New("module", "execs.multisig")
// OwnerAdd : 交易操作类型
var ( var (
OwnerAdd uint64 = 1 OwnerAdd uint64 = 1
OwnerDel uint64 = 2 OwnerDel uint64 = 2
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package types package types
import "errors" import "errors"
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package types package types
import ( import (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment