core, all: split vm.Context into BlockContext and TxContext (#21672)
* all: core: split vm.Config into BlockConfig and TxConfig * core: core/vm: reset EVM between tx in block instead of creating new * core/vm: added docs
This commit is contained in:
committed by
GitHub
parent
6f4cccf8d2
commit
2045a2bba3
@ -182,9 +182,10 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
|
||||
if err != nil {
|
||||
return nil, nil, common.Hash{}, err
|
||||
}
|
||||
context := core.NewEVMContext(msg, block.Header(), nil, &t.json.Env.Coinbase)
|
||||
txContext := core.NewEVMTxContext(msg)
|
||||
context := core.NewEVMBlockContext(block.Header(), nil, &t.json.Env.Coinbase)
|
||||
context.GetHash = vmTestBlockHash
|
||||
evm := vm.NewEVM(context, statedb, config, vmconfig)
|
||||
evm := vm.NewEVM(context, txContext, statedb, config, vmconfig)
|
||||
|
||||
if config.IsYoloV2(context.BlockNumber) {
|
||||
statedb.AddAddressToAccessList(msg.From())
|
||||
|
Reference in New Issue
Block a user