Add test to cover that.

This commit is contained in:
Tomasz Drwięga
2017-08-28 12:32:19 +02:00
parent dd3b6d49ee
commit 4f69ee0437
2 changed files with 38 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ pub struct FakeExt {
pub info: EnvInfo,
pub schedule: Schedule,
pub balances: HashMap<Address, U256>,
pub tracing: bool,
}
// similar to the normal `finalize` function, but ignoring NeedsReturn.
@@ -184,4 +185,8 @@ impl Ext for FakeExt {
fn inc_sstore_clears(&mut self) {
self.sstore_clears += 1;
}
fn trace_next_instruction(&mut self, _pc: usize, _instruction: u8) -> bool {
self.tracing
}
}