Skip to content

Commit 85d5f2c

Browse files
authored
Merge pull request #16285 from karalabe/fix-resend-optional-param
internal/ethapi: make resent gas params optional
2 parents 704840a + 28ef23f commit 85d5f2c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎internal/ethapi/api.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,10 +1337,10 @@ func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, sendArgs SendTxAr
13371337

13381338
if pFrom, err := types.Sender(signer, p); err == nil && pFrom == sendArgs.From && signer.Hash(p) == wantSigHash {
13391339
// Match. Re-sign and send the transaction.
1340-
if gasPrice != nil {
1340+
if gasPrice != nil && (*big.Int)(gasPrice).Sign() != 0 {
13411341
sendArgs.GasPrice = gasPrice
13421342
}
1343-
if gasLimit != nil {
1343+
if gasLimit != nil && *gasLimit != 0 {
13441344
sendArgs.Gas = gasLimit
13451345
}
13461346
signedTx, err := s.sign(sendArgs.From, sendArgs.toTransaction())

0 commit comments

Comments
 (0)