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

Commit a8f6f5b

Browse files
authored
ethereum libfuzzer integration small change (#9547)
* Minor changes for ethereum libfuzzer.
1 parent 1e13f47 commit a8f6f5b

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

ethcore/src/client/evm_test_client.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,19 @@ impl<'a> EvmTestClient<'a> {
182182
gas_used: 0.into(),
183183
gas_limit: *genesis.gas_limit(),
184184
};
185+
self.call_envinfo(params, tracer, vm_tracer, info)
186+
}
187+
188+
/// Execute the VM given envinfo, ActionParams and tracer.
189+
/// Returns amount of gas left and the output.
190+
pub fn call_envinfo<T: trace::Tracer, V: trace::VMTracer>(
191+
&mut self,
192+
params: ActionParams,
193+
tracer: &mut T,
194+
vm_tracer: &mut V,
195+
info: client::EnvInfo,
196+
) -> Result<FinalizationResult, EvmTestError>
197+
{
185198
let mut substate = state::Substate::new();
186199
let machine = self.spec.engine.machine();
187200
let schedule = machine.schedule(info.number);

ethcore/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ pub mod header;
159159
pub mod machine;
160160
pub mod miner;
161161
pub mod pod_state;
162+
pub mod pod_account;
162163
pub mod snapshot;
163164
pub mod spec;
164165
pub mod state;
@@ -167,7 +168,6 @@ pub mod trace;
167168
pub mod verification;
168169

169170
mod cache_manager;
170-
mod pod_account;
171171
mod account_db;
172172
mod externalities;
173173
mod blockchain;

ethcore/src/pod_account.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
1616

17+
//! Account system expressed in Plain Old Data.
18+
1719
use std::fmt;
1820
use std::collections::BTreeMap;
1921
use itertools::Itertools;

0 commit comments

Comments
 (0)