core/vm: Hide read only flag from Interpreter interface (#17461)

Makes Interface interface a bit more stateless and abstract.

Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
This commit is contained in:
Paweł Bylica
2018-09-07 18:13:25 +02:00
committed by Guillaume Ballet
parent 8b9b149d54
commit ae992a5d73
3 changed files with 17 additions and 31 deletions

View File

@ -49,7 +49,7 @@ func runTrace(tracer *Tracer) (json.RawMessage, error) {
contract := vm.NewContract(account{}, account{}, big.NewInt(0), 10000)
contract.Code = []byte{byte(vm.PUSH1), 0x1, byte(vm.PUSH1), 0x1, 0x0}
_, err := env.Interpreter().Run(contract, []byte{})
_, err := env.Interpreter().Run(contract, []byte{}, false)
if err != nil {
return nil, err
}