Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

ethereum libfuzzer integration small change #9547

Merged
merged 8 commits into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ethcore/src/client/evm_test_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: trace::Tracer, V: trace::VMTracer>(
&mut self,
params: ActionParams,
tracer: &mut T,
vm_tracer: &mut V,
info: client::EnvInfo,
) -> Result<FinalizationResult, EvmTestError>
{
let mut substate = state::Substate::new();
let machine = self.spec.engine.machine();
let schedule = machine.schedule(info.number);
Expand All @@ -194,6 +207,7 @@ impl<'a> EvmTestClient<'a> {
).map_err(EvmTestError::Evm)
}


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra blank line. Please remove!

/// Executes a SignedTransaction within context of the provided state and `EnvInfo`.
/// Returns the state root, gas left and the output.
pub fn transact<T: trace::Tracer, V: trace::VMTracer>(
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -167,7 +168,6 @@ pub mod trace;
pub mod verification;

mod cache_manager;
mod pod_account;
mod account_db;
mod externalities;
mod blockchain;
Expand Down
2 changes: 2 additions & 0 deletions ethcore/src/pod_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

//! Account system expressed in Plain Old Data.

use std::fmt;
use std::collections::BTreeMap;
use itertools::Itertools;
Expand Down