Skip to content

Commit

Permalink
fixup! eth: fix max gas price nil pointer error in replace transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
kyriediculous committed Sep 2, 2021
1 parent c003537 commit 9aa366c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion eth/transactionManager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ func TestTransactionManager_Replace(t *testing.T) {
)

// Error signing replacement tx
gpm.maxGasPrice = nil
expErr = errors.New("SignTx error")
sig := &stubTransactionSigner{
err: nil,
Expand All @@ -222,6 +221,12 @@ func TestTransactionManager_Replace(t *testing.T) {
assert.EqualError(err, expErr.Error())
sig.err = nil

// Test when max gas price is nil - should still return signing replacement tx error
gpm.maxGasPrice = nil
tx, err = tm.replace(stubTx)
assert.Nil(tx)
assert.EqualError(err, expErr.Error())

// Error sending replacement tx
expErr = errors.New("SendTx error")
eth.err["SendTransaction"] = expErr
Expand Down

0 comments on commit 9aa366c

Please sign in to comment.