Skip to content

Commit

Permalink
Print backtraces when out of gas or ink
Browse files Browse the repository at this point in the history
This makes is clearer at exactly what point in the code the
transaction execution ran out of gas or ink.
  • Loading branch information
eljobe committed Jul 18, 2024
1 parent f00ea31 commit 5382ce5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arbitrator/prover/src/programs/meter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ pub trait MeteredMachine {

fn out_of_ink<T>(&mut self) -> Result<T, OutOfInkError> {
println!(
"Got out of ink in rust at:\n{}",
"Got out of ink in rust at:\n{:?}",
std::backtrace::Backtrace::force_capture()
);
self.set_meter(MachineMeter::Exhausted);
Expand Down
2 changes: 1 addition & 1 deletion arbitrator/stylus/tests/multicall/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ wee_alloc = "0.4.5"

[profile.release]
codegen-units = 1
strip = true
debug = true
lto = true
panic = "abort"

Expand Down

0 comments on commit 5382ce5

Please sign in to comment.