Skip to content

Commit

Permalink
Fixed TestEth_EstimateGas_Reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
jelacamarko committed Sep 20, 2023
1 parent b5f2f43 commit 5bf9b73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jsonrpc/eth_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ func TestEth_EstimateGas_GasLimit(t *testing.T) {
assert.ErrorIs(t, estimateErr, testCase.expectedError)

// Make sure the estimate is nullified
assert.Equal(t, 0, estimate)
assert.Equal(t, []byte{}, estimate)
} else {
// Make sure no errors occurred
assert.NoError(t, estimateErr)
Expand Down Expand Up @@ -734,7 +734,10 @@ func TestEth_EstimateGas_Reverts(t *testing.T) {
nil,
)

assert.Equal(t, 0, estimate)
responseData, ok := estimate.([]byte)
assert.True(t, ok)

assert.Equal(t, exampleReturnData, string(responseData))

// Make sure the EVM revert message is contained
assert.ErrorIs(t, estimateErr, runtime.ErrExecutionReverted)
Expand Down

0 comments on commit 5bf9b73

Please sign in to comment.