Use IsCancun where applicable (#56)

* replace Accesses != nil with IsCancun(...)

* fix
This commit is contained in:
jwasinger
2022-01-13 23:53:27 -10:00
committed by GitHub
parent 952be80177
commit 99604b0699
5 changed files with 14 additions and 14 deletions

View File

@ -304,7 +304,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
if st.gas < gas {
return nil, fmt.Errorf("%w: have %d, want %d", ErrIntrinsicGas, st.gas, gas)
}
if st.evm.Accesses != nil {
if st.evm.ChainConfig().IsCancun(st.evm.Context.BlockNumber) {
if msg.To() != nil {
toBalance := trieUtils.GetTreeKeyBalance(msg.To().Bytes())
pre := st.state.GetBalance(*msg.To())