From 70d700d8b84e6f5dc85d44b9a6bf2a8303175745 Mon Sep 17 00:00:00 2001 From: cheme Date: Thu, 13 Sep 2018 11:18:48 +0200 Subject: [PATCH 1/2] Change needed by current ethereum libfuzzer. --- ethcore/src/client/evm_test_client.rs | 14 ++++++++++++++ ethcore/src/lib.rs | 2 +- ethcore/src/pod_account.rs | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ethcore/src/client/evm_test_client.rs b/ethcore/src/client/evm_test_client.rs index 1d827dea626..49dca485588 100644 --- a/ethcore/src/client/evm_test_client.rs +++ b/ethcore/src/client/evm_test_client.rs @@ -182,6 +182,19 @@ impl<'a> EvmTestClient<'a> { gas_used: 0.into(), gas_limit: *genesis.gas_limit(), }; + self.call_envinfo(params, tracer, vm_tracer, info) + } + + /// Execute the VM given envinfo, ActionParams and tracer. + /// Returns amount of gas left and the output. + pub fn call_envinfo( + &mut self, + params: ActionParams, + tracer: &mut T, + vm_tracer: &mut V, + info: client::EnvInfo, + ) -> Result + { let mut substate = state::Substate::new(); let machine = self.spec.engine.machine(); let schedule = machine.schedule(info.number); @@ -194,6 +207,7 @@ impl<'a> EvmTestClient<'a> { ).map_err(EvmTestError::Evm) } + /// Executes a SignedTransaction within context of the provided state and `EnvInfo`. /// Returns the state root, gas left and the output. pub fn transact( diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index 7a746b74b44..fefa9b5e051 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -159,6 +159,7 @@ pub mod header; pub mod machine; pub mod miner; pub mod pod_state; +pub mod pod_account; pub mod snapshot; pub mod spec; pub mod state; @@ -167,7 +168,6 @@ pub mod trace; pub mod verification; mod cache_manager; -mod pod_account; mod account_db; mod externalities; mod blockchain; diff --git a/ethcore/src/pod_account.rs b/ethcore/src/pod_account.rs index f35f0517780..3b66705ba7a 100644 --- a/ethcore/src/pod_account.rs +++ b/ethcore/src/pod_account.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . +//! Account system expressed in Plain Old Data. + use std::fmt; use std::collections::BTreeMap; use itertools::Itertools; From 53cd0370bf4d88ed14d0a7517f374e1aebfb0f87 Mon Sep 17 00:00:00 2001 From: Emeric Chevalier Date: Sat, 15 Sep 2018 19:15:44 +0200 Subject: [PATCH 2/2] Remove extra line. --- ethcore/src/client/evm_test_client.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/ethcore/src/client/evm_test_client.rs b/ethcore/src/client/evm_test_client.rs index 49dca485588..2702380e5fa 100644 --- a/ethcore/src/client/evm_test_client.rs +++ b/ethcore/src/client/evm_test_client.rs @@ -207,7 +207,6 @@ impl<'a> EvmTestClient<'a> { ).map_err(EvmTestError::Evm) } - /// Executes a SignedTransaction within context of the provided state and `EnvInfo`. /// Returns the state root, gas left and the output. pub fn transact(