Remove pass-by-reference return data value from executive (#9211)

* Remove pass-by-reference return data value from executive

* Fix tests

* Fix a missing test output

* typo: wasm_activation_test

* Tracing change in output

* json_tests: fix compile

* typo: 0..32 -> ..32 to keep it consistent with other occurance

* Fix tests
This commit is contained in:
Wei Tang
2018-08-14 05:27:13 +08:00
committed by GitHub
parent 9c595aff95
commit ff716e7799
12 changed files with 137 additions and 122 deletions

View File

@@ -19,7 +19,7 @@
use std::fmt;
use std::sync::Arc;
use ethereum_types::{H256, U256, H160};
use {factory, journaldb, trie, kvdb_memorydb, bytes};
use {factory, journaldb, trie, kvdb_memorydb};
use kvdb::{self, KeyValueDB};
use {state, state_db, client, executive, trace, transaction, db, spec, pod_state, log_entry, receipt};
use factory::Factories;
@@ -183,14 +183,12 @@ impl<'a> EvmTestClient<'a> {
gas_limit: *genesis.gas_limit(),
};
let mut substate = state::Substate::new();
let mut output = vec![];
let machine = self.spec.engine.machine();
let schedule = machine.schedule(info.number);
let mut executive = executive::Executive::new(&mut self.state, &info, &machine, &schedule);
executive.call(
params,
&mut substate,
bytes::BytesRef::Flexible(&mut output),
tracer,
vm_tracer,
).map_err(EvmTestError::Evm)