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

@ -243,7 +243,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
if len(code) == 0 {
ret, err = nil, nil // gas is unchanged
} else {
if evm.Accesses != nil {
if evm.chainConfig.IsCancun(evm.Context.BlockNumber) {
// Touch the account data
var data [32]byte
evm.Accesses.TouchAddress(utils.GetTreeKeyVersion(addr.Bytes()), data[:])