Merge pull request #5111 from filecoin-project/fix/send-nonce-0

fix: send with declared nonce 0
This commit is contained in:
Łukasz Magiera 2020-12-03 19:01:19 +01:00 committed by GitHub
commit b13226bc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,10 +43,10 @@ var sendCmd = &cli.Command{
Usage: "specify gas limit",
Value: 0,
},
&cli.Int64Flag{
&cli.Uint64Flag{
Name: "nonce",
Usage: "specify the nonce to use",
Value: -1,
Value: 0,
},
&cli.Uint64Flag{
Name: "method",
@ -143,8 +143,8 @@ var sendCmd = &cli.Command{
Params: params,
}
if cctx.Int64("nonce") > 0 {
msg.Nonce = uint64(cctx.Int64("nonce"))
if cctx.IsSet("nonce") {
msg.Nonce = cctx.Uint64("nonce")
sm, err := api.WalletSignMessage(ctx, fromAddr, msg)
if err != nil {
return err