From 15d98607f3688577cad44325142e6d33bdd7e94e Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Wed, 17 Nov 2021 11:05:16 +0100 Subject: [PATCH] initialize the new access witness if not already present --- core/vm/evm.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/vm/evm.go b/core/vm/evm.go index a2ff1adfff..f5bdff8303 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -132,6 +132,9 @@ type EVM struct { // NewEVM returns a new EVM. The returned EVM is not thread safe and should // only ever be used *once*. func NewEVM(blockCtx BlockContext, txCtx TxContext, statedb StateDB, chainConfig *params.ChainConfig, config Config) *EVM { + if txCtx.Accesses == nil { + txCtx.Accesses = types.NewAccessWitness() + } evm := &EVM{ Context: blockCtx, TxContext: txCtx,