Skip to content

Commit

Permalink
Omit edgecase high nonce test. tracer gas fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita committed Jan 14, 2022
1 parent d7fa214 commit 1318700
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bins/revme/src/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ pub fn execute_test_suit(path: &PathBuf, elapsed: &Arc<Mutex<Duration>>) -> Resu
if path.file_name() == Some(OsStr::new("ValueOverflow.json")) {
return Ok(());
}
// test with very high nonce that in revm overflows. Impossible to happen.
// https://github.com/bluealloy/revm/issues/28
if path.file_name() == Some(OsStr::new("CREATE2_HighNonceDelegatecall.json")) {
return Ok(());
}
// /*
// Test that take a lot of time so we are going to skip them
if path.file_name() == Some(OsStr::new("loopExp.json")) {
Expand Down
4 changes: 3 additions & 1 deletion bins/revme/src/statetest/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ impl<DB: Database> Inspector<DB> for CustomPrintTracer {
//hex::encode(machine.memory.data()),
);

self.reduced_gas_block += info.gas;
if info.gas_block_end {
self.reduced_gas_block = 0;
self.full_gas_block = machine.contract.gas_block(machine.program_counter());
} else {
self.reduced_gas_block += info.gas;
}

Return::Continue
Expand Down

0 comments on commit 1318700

Please sign in to comment.