From ecfb27a76e3a9d27ff6be9204f1dcd6eef42ab89 Mon Sep 17 00:00:00 2001 From: rain-zxn <206131521@qq.com> Date: Wed, 9 Nov 2022 15:46:40 +0800 Subject: [PATCH] use latest block nonce --- wallet/nonce.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wallet/nonce.go b/wallet/nonce.go index e01774f..7c14bfd 100644 --- a/wallet/nonce.go +++ b/wallet/nonce.go @@ -19,8 +19,6 @@ package wallet import ( "context" - "math/big" - "github.com/ethereum/go-ethereum/common" "github.com/polynetwork/bridge-common/chains/eth" ) @@ -40,7 +38,7 @@ type RemoteNonceProvider struct { } func (p *RemoteNonceProvider) Acquire() (uint64, error) { - return p.sdk.Node().NonceAt(context.Background(), p.address, big.NewInt(-1)) + return p.sdk.Node().NonceAt(context.Background(), p.address, nil) } func (p *RemoteNonceProvider) Update(success bool) {