diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-03-08 18:52:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-08 18:52:38 +0800 |
commit | 85d5f2c661cd9461e64d6a224076ebc627e14a55 (patch) | |
tree | 2aa953948bb1c72d7a0d94fd767415566651d114 | |
parent | 704840a8ad9e75d4a00e734f901cac21c51b7eb5 (diff) | |
parent | 28ef23f446cd714c17304e46eb0a34441c29d72a (diff) | |
download | dexon-85d5f2c661cd9461e64d6a224076ebc627e14a55.tar dexon-85d5f2c661cd9461e64d6a224076ebc627e14a55.tar.gz dexon-85d5f2c661cd9461e64d6a224076ebc627e14a55.tar.bz2 dexon-85d5f2c661cd9461e64d6a224076ebc627e14a55.tar.lz dexon-85d5f2c661cd9461e64d6a224076ebc627e14a55.tar.xz dexon-85d5f2c661cd9461e64d6a224076ebc627e14a55.tar.zst dexon-85d5f2c661cd9461e64d6a224076ebc627e14a55.zip |
Merge pull request #16285 from karalabe/fix-resend-optional-param
internal/ethapi: make resent gas params optional
-rw-r--r-- | internal/ethapi/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index e49244404..6525aa212 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1337,10 +1337,10 @@ func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, sendArgs SendTxAr if pFrom, err := types.Sender(signer, p); err == nil && pFrom == sendArgs.From && signer.Hash(p) == wantSigHash { // Match. Re-sign and send the transaction. - if gasPrice != nil { + if gasPrice != nil && (*big.Int)(gasPrice).Sign() != 0 { sendArgs.GasPrice = gasPrice } - if gasLimit != nil { + if gasLimit != nil && *gasLimit != 0 { sendArgs.Gas = gasLimit } signedTx, err := s.sign(sendArgs.From, sendArgs.toTransaction()) |