Skip to content

Commit

Permalink
Merge branch 'master' into fix_code_scan
Browse files Browse the repository at this point in the history
  • Loading branch information
Liuhaai committed Jul 14, 2022
2 parents bcd65a8 + bfbaece commit 0a9cefc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions action/consignment_transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ type (

// ConsignMsgEther is the consignment message format of Ethereum
ConsignMsgEther struct {
BucketIdx int `json:"bucket"`
Nonce int `json:"nonce"`
BucketIdx uint64 `json:"bucket"`
Nonce uint64 `json:"nonce"`
Recipient string `json:"recipient"`
Reclaim string `json:"reclaim"`
}
Expand Down Expand Up @@ -148,8 +148,8 @@ func NewConsignMsg(sigType, recipient string, bucketIdx, nonce uint64) ([]byte,
switch sigType {
case "Ethereum":
msg := ConsignMsgEther{
BucketIdx: int(bucketIdx),
Nonce: int(nonce),
BucketIdx: bucketIdx,
Nonce: nonce,
Recipient: recipient,
Reclaim: _reclaim,
}
Expand Down
4 changes: 2 additions & 2 deletions action/protocol/staking/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ func TestProtocol_HandleConsignmentTransfer(t *testing.T) {
// transfer to test.to through consignment
var consign []byte
if !test.nilPayload {
consign = newconsignment(require, int(test.sigIndex), int(test.sigNonce), test.bucketOwner, test.to.String(), test.consignType, test.reclaim, test.wrongSig)
consign = newconsignment(require, test.sigIndex, test.sigNonce, test.bucketOwner, test.to.String(), test.consignType, test.reclaim, test.wrongSig)
}

act, err := action.NewTransferStake(1, caller.String(), 0, consign, gasLimit, gasPrice)
Expand Down Expand Up @@ -2713,7 +2713,7 @@ func depositGas(ctx context.Context, sm protocol.StateManager, gasFee *big.Int)
return nil, accountutil.StoreAccount(sm, actionCtx.Caller, acc)
}

func newconsignment(r *require.Assertions, bucketIdx, nonce int, senderPrivate, recipient, consignTpye, reclaim string, wrongSig bool) []byte {
func newconsignment(r *require.Assertions, bucketIdx, nonce uint64, senderPrivate, recipient, consignTpye, reclaim string, wrongSig bool) []byte {
msg := action.ConsignMsgEther{
BucketIdx: bucketIdx,
Nonce: nonce,
Expand Down

0 comments on commit 0a9cefc

Please sign in to comment.