From 28ef23f446cd714c17304e46eb0a34441c29d72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 8 Mar 2018 12:29:42 +0200 Subject: [PATCH] internal/ethapi: make resent gas params optional --- internal/ethapi/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index e492444042..6525aa212c 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())