Skip to content
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
Prev Previous commit
Next Next commit
fmt code
  • Loading branch information
Pana committed Mar 26, 2024
commit cf16da05bb00db8f0cccd6ea640a27978c19e1be
4 changes: 3 additions & 1 deletion crates/revm/src/inspector/eip3155.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ impl<DB: Database> Inspector<DB> for TracerEip3155 {
let value = Summary {
state_root: B256::ZERO.to_string(),
output: outcome.result.output.to_string(),
gas_used: hex_number(context.inner.env().tx.gas_limit - self.gas_inspector.gas_remaining()),
gas_used: hex_number(
context.inner.env().tx.gas_limit - self.gas_inspector.gas_remaining(),
),
pass: outcome.result.is_ok(),

time: None,
Expand Down
7 changes: 5 additions & 2 deletions examples/generate_block_traces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ async fn main() -> anyhow::Result<()> {
for tx in block.transactions {
evm = evm
.modify()
.reset_handler_with_external_context(TracerEip3155::new(Box::new(std::io::stdout()), true))
.reset_handler_with_external_context(TracerEip3155::new(
Box::new(std::io::stdout()),
true,
))
.modify_tx_env(|etx| {
etx.caller = Address::from(tx.from.as_fixed_bytes());
etx.gas_limit = tx.gas.as_u64();
Expand Down Expand Up @@ -179,7 +182,7 @@ async fn main() -> anyhow::Result<()> {
}

console_bar.finish_with_message("Finished all transactions.");

let elapsed = start.elapsed();
println!(
"Finished execution. Total CPU time: {:.6}s",
Expand Down