diff --git a/action/consignment_transfer.go b/action/consignment_transfer.go index 264e9bfe68..d8115112f6 100644 --- a/action/consignment_transfer.go +++ b/action/consignment_transfer.go @@ -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"` } @@ -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, } diff --git a/action/protocol/staking/handlers_test.go b/action/protocol/staking/handlers_test.go index 8f5231c0db..1b9727afe5 100644 --- a/action/protocol/staking/handlers_test.go +++ b/action/protocol/staking/handlers_test.go @@ -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) @@ -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,