Extract Machine from ethcore (#10949)

* Add client-traits crate
Move the BlockInfo trait to new crate

* New crate `machine`
Contains code extracted from ethcore that defines `Machine`, `Externalities` and other execution related code.

* Use new machine and client-traits crates in ethcore

* Use new crates machine and client-traits instead of ethcore where appropriate

* Fix tests

* Don't re-export so many types from ethcore::client

* Fixing more fallout from removing re-export

* fix test

* More fallout from not re-exporting types

* Add some docs

* cleanup

* import the macro edition style

* Tweak docs

* Add missing import

* remove unused ethabi_derive imports

* Use latest ethabi-contract
This commit is contained in:
David
2019-08-13 12:33:34 +02:00
committed by GitHub
parent 509fda727b
commit 73f4564b66
107 changed files with 1042 additions and 583 deletions

View File

@@ -18,24 +18,27 @@ use std::path::Path;
use std::sync::Arc;
use super::test_common::*;
use account_state::{Backend as StateBackend, State};
use substate::Substate;
use executive::*;
use evm::{VMType, Finalize};
use vm::{
self, ActionParams, CallType, Schedule, Ext,
ContractCreateResult, EnvInfo, MessageCallResult,
CreateContractAddress, ReturnData,
};
use externalities::*;
use machine::{
Machine,
externalities::{OutputPolicy, OriginInfo, Externalities},
substate::Substate,
executive::contract_address,
test_helpers::new_frontier_test_machine,
};
use test_helpers::get_temp_state;
use ethjson;
use trace::{Tracer, NoopTracer};
use trace::{VMTracer, NoopVMTracer};
use trace::{Tracer, NoopTracer, VMTracer, NoopVMTracer};
use bytes::Bytes;
use ethtrie;
use rlp::RlpStream;
use hash::keccak;
use machine::Machine;
use ethereum_types::BigEndianHash;
use crate::spec;

View File

@@ -24,7 +24,7 @@ use types::{
errors::EthcoreError as Error,
transaction::UnverifiedTransaction
};
use transaction_ext::Transaction;
use machine::transaction_ext::Transaction;
/// Run transaction jsontests on a given folder.
pub fn run_test_path<H: FnMut(&str, HookType)>(p: &Path, skip: &[&'static str], h: &mut H) {