Skip to content

Commit

Permalink
only print state when in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
weikengchen committed Jul 11, 2024
1 parent 6f0b2d2 commit 8a445c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ bitcoin-simulator = { git = "https://github.com/Bitcoin-Wildlife-Sanctuary/bitco
opt-level = 3

[profile.release]
lto = true
lto = true

[features]
debug = []
2 changes: 2 additions & 0 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ pub fn simulation_test<T: CovenantProgram>(
let mut old_tx_outpoint1 = init_tx.input[0].previous_output;
let mut old_tx_outpoint2 = None;

#[cfg(feature = "debug")]
eprintln!("{:?}", old_state);

for _ in 0..100 {
Expand Down Expand Up @@ -190,6 +191,7 @@ pub fn simulation_test<T: CovenantProgram>(
old_balance = new_balance;
old_txid = tx_template.tx.compute_txid();

#[cfg(feature = "debug")]
eprintln!("{:?}", old_state);

old_tx_outpoint1 = tx_template.tx.input[0].previous_output;
Expand Down

0 comments on commit 8a445c7

Please sign in to comment.