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
@ -86,8 +86,9 @@ func precacheTransaction(config *params.ChainConfig, bc ChainContext, author *co
|
||||
return err
|
||||
}
|
||||
// Create the EVM and execute the transaction
|
||||
context := NewEVMContext(msg, header, bc, author)
|
||||
vm := vm.NewEVM(context, statedb, config, cfg)
|
||||
context := NewEVMBlockContext(header, bc, author)
|
||||
txContext := NewEVMTxContext(msg)
|
||||
vm := vm.NewEVM(context, txContext, statedb, config, cfg)
|
||||
|
||||
_, err = ApplyMessage(vm, msg, gaspool)
|
||||
return err
|
||||
|
Reference in New Issue
Block a user