Skip to content

Commit

Permalink
EVM-523 Fix race condition in gas estimation (#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorcrevar committed Jun 2, 2023
1 parent d230546 commit da4ffe1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions jsonrpc/eth_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,7 @@ func getExampleStore() *mockSpecialStore {
// the latest block gas limit for the upper bound, or the specified
// gas limit in the transaction
func TestEth_EstimateGas_GasLimit(t *testing.T) {
//nolint:godox
// TODO Make this test run in parallel when the race condition is fixed in gas estimation (to be fixed in EVM-523)
store := getExampleStore()
ethEndpoint := newTestEthEndpoint(store)
t.Parallel()

testTable := []struct {
name string
Expand Down Expand Up @@ -650,7 +647,14 @@ func TestEth_EstimateGas_GasLimit(t *testing.T) {
}

for _, testCase := range testTable {
testCase := testCase

t.Run(testCase.name, func(t *testing.T) {
t.Parallel()

store := getExampleStore()
ethEndpoint := newTestEthEndpoint(store)

// Set up the apply hook
if errors.Is(testCase.expectedError, state.ErrNotEnoughIntrinsicGas) {
// We want to trigger a situation where no value in the gas range is correct
Expand Down

0 comments on commit da4ffe1

Please sign in to comment.