From f4ffa0895afdd3659fd5fae8838cd0c259d3efc4 Mon Sep 17 00:00:00 2001 From: rain-zxn <206131521@qq.com> Date: Thu, 30 Jun 2022 17:51:06 +0800 Subject: [PATCH] upgrade gaslimit to *1.1 --- wallet/wallet.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wallet/wallet.go b/wallet/wallet.go index e067b71..61e24da 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -36,6 +36,7 @@ import ( type Config struct { ChainId uint64 KeyStoreProviders []*KeyStoreProviderConfig + KeyProviders []string Nodes []string // NEO wallet @@ -324,6 +325,7 @@ func (w *Wallet) SendWithMaxLimit(account accounts.Account, addr common.Address, return } + limit = uint64(1.1 * float32(limit)) if maxLimit.Cmp(new(big.Int).Mul(big.NewInt(int64(limit)), gasPrice)) == -1 { nonces.Update(false) err = fmt.Errorf("Send tx estimated gas (limit %v, price %s) higher than max limit %s", limit, gasPrice, maxLimit)