Skip to content

Commit

Permalink
chore: use stderr for revme tracer. not panic on bytecode (#1916)
Browse files Browse the repository at this point in the history
* chore: mdbook links check

* chore: use stderr for revme tracer. not panic on bytecode
  • Loading branch information
rakita authored Dec 16, 2024
1 parent 159be28 commit 99d1219
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bins/revme/src/cmd/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use statetest_types::{SpecName, Test, TestSuite};
use std::{
convert::Infallible,
fmt::Debug,
io::stdout,
io::stderr,
path::{Path, PathBuf},
sync::{
atomic::{AtomicBool, AtomicUsize, Ordering},
Expand Down Expand Up @@ -268,7 +268,8 @@ pub fn execute_test_suite(
let mut cache_state = database::CacheState::new(false);
for (address, info) in unit.pre {
let code_hash = keccak256(&info.code);
let bytecode = Bytecode::new_raw(info.code);
let bytecode = Bytecode::new_raw_checked(info.code.clone())
.unwrap_or(Bytecode::new_legacy(info.code));
let acc_info = revm::state::AccountInfo {
balance: info.balance,
code_hash,
Expand Down Expand Up @@ -421,7 +422,7 @@ pub fn execute_test_suite(
.with_tx(&tx)
.with_cfg(&cfg)
.with_db(&mut state),
TracerEip3155::new(Box::new(stdout())),
TracerEip3155::new(Box::new(stderr())),
),
inspector_handler(),
);
Expand Down Expand Up @@ -497,7 +498,7 @@ pub fn execute_test_suite(
.with_block(&block)
.with_tx(&tx)
.with_cfg(&cfg),
TracerEip3155::new(Box::new(stdout())),
TracerEip3155::new(Box::new(stderr())),
),
inspector_handler(),
);
Expand Down

0 comments on commit 99d1219

Please sign in to comment.