Avoid schedule copying in nested call/create (#9190)
* Avoid schedule copying in nested call/create * Fix tests * fix test: wrong Schedule used * Fix private-tx test * Fix jsontests compilation
This commit is contained in:
@@ -373,8 +373,11 @@ fn transaction_proof() {
|
||||
factories.accountdb = ::account_db::Factory::Plain; // raw state values, no mangled keys.
|
||||
let root = *client.best_block_header().state_root();
|
||||
|
||||
let machine = test_spec.engine.machine();
|
||||
let env_info = client.latest_env_info();
|
||||
let schedule = machine.schedule(env_info.number);
|
||||
let mut state = State::from_existing(backend, root, 0.into(), factories.clone()).unwrap();
|
||||
Executive::new(&mut state, &client.latest_env_info(), test_spec.engine.machine())
|
||||
Executive::new(&mut state, &env_info, &machine, &schedule)
|
||||
.transact(&transaction, TransactOptions::with_no_tracing().dont_check_nonce()).unwrap();
|
||||
|
||||
assert_eq!(state.balance(&Address::default()).unwrap(), 5.into());
|
||||
|
||||
@@ -62,7 +62,8 @@ fn test_blockhash_eip210(factory: Factory) {
|
||||
call_type: CallType::Call,
|
||||
params_type: ParamsType::Separate,
|
||||
};
|
||||
let mut ex = Executive::new(&mut state, &env_info, &machine);
|
||||
let schedule = machine.schedule(env_info.number);
|
||||
let mut ex = Executive::new(&mut state, &env_info, &machine, &schedule);
|
||||
let mut substate = Substate::new();
|
||||
let mut output = [];
|
||||
if let Err(e) = ex.call(params, &mut substate, BytesRef::Fixed(&mut output), &mut NoopTracer, &mut NoopVMTracer) {
|
||||
@@ -85,7 +86,8 @@ fn test_blockhash_eip210(factory: Factory) {
|
||||
call_type: CallType::Call,
|
||||
params_type: ParamsType::Separate,
|
||||
};
|
||||
let mut ex = Executive::new(&mut state, &env_info, &machine);
|
||||
let schedule = machine.schedule(env_info.number);
|
||||
let mut ex = Executive::new(&mut state, &env_info, &machine, &schedule);
|
||||
let mut substate = Substate::new();
|
||||
let mut output = H256::new();
|
||||
if let Err(e) = ex.call(params, &mut substate, BytesRef::Fixed(&mut output), &mut NoopTracer, &mut NoopVMTracer) {
|
||||
|
||||
Reference in New Issue
Block a user