update the error type for out of gas (#3900)

pull/3872/merge
Rongjian Lan 3 years ago committed by GitHub
parent 471af49477
commit 616e94f668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      core/state_transition.go

@ -18,6 +18,7 @@ package core
import (
"bytes"
"fmt"
"math"
"math/big"
"sort"
@ -268,7 +269,7 @@ func (st *StateTransition) TransitionDb() (ExecutionResult, error) {
return ExecutionResult{}, err
}
if err = st.useGas(gas); err != nil {
return ExecutionResult{}, err
return ExecutionResult{}, fmt.Errorf("%w: have %d, want %d", ErrIntrinsicGas, st.gas, gas)
}
evm := st.evm

Loading…
Cancel
Save