Skip to content

Commit e063ad8

Browse files
committed
fix(esplora+wallet+file_store): remove remaining println! usage
1 parent b32b944 commit e063ad8

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

crates/esplora/src/async_ext.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ mod test {
490490
#[tokio::test]
491491
pub async fn test_finalize_chain_update() -> anyhow::Result<()> {
492492
struct TestCase<'a> {
493+
#[allow(dead_code)]
493494
name: &'a str,
494495
/// Initial blockchain height to start the env with.
495496
initial_env_height: u32,
@@ -526,9 +527,7 @@ mod test {
526527
},
527528
];
528529

529-
for (i, t) in test_cases.into_iter().enumerate() {
530-
println!("[{}] running test case: {}", i, t.name);
531-
530+
for t in test_cases.into_iter() {
532531
let env = TestEnv::new()?;
533532
let base_url = format!("http://{}", &env.electrsd.esplora_url.clone().unwrap());
534533
let client = Builder::new(base_url.as_str()).build_async()?;
@@ -571,7 +570,6 @@ mod test {
571570
chain.apply_update(update)?;
572571
chain
573572
};
574-
println!("local chain height: {}", local_chain.tip().height());
575573

576574
// extend env chain
577575
if let Some(to_mine) = t
@@ -611,10 +609,6 @@ mod test {
611609
// apply update
612610
let mut updated_local_chain = local_chain.clone();
613611
updated_local_chain.apply_update(update)?;
614-
println!(
615-
"updated local chain height: {}",
616-
updated_local_chain.tip().height()
617-
);
618612

619613
assert!(
620614
{

crates/esplora/src/blocking_ext.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ mod test {
490490
#[test]
491491
pub fn test_finalize_chain_update() -> anyhow::Result<()> {
492492
struct TestCase<'a> {
493+
#[allow(dead_code)]
493494
name: &'a str,
494495
/// Initial blockchain height to start the env with.
495496
initial_env_height: u32,
@@ -526,9 +527,7 @@ mod test {
526527
},
527528
];
528529

529-
for (i, t) in test_cases.into_iter().enumerate() {
530-
println!("[{}] running test case: {}", i, t.name);
531-
530+
for t in test_cases.into_iter() {
532531
let env = TestEnv::new()?;
533532
let base_url = format!("http://{}", &env.electrsd.esplora_url.clone().unwrap());
534533
let client = Builder::new(base_url.as_str()).build_blocking();
@@ -570,7 +569,6 @@ mod test {
570569
chain.apply_update(update)?;
571570
chain
572571
};
573-
println!("local chain height: {}", local_chain.tip().height());
574572

575573
// extend env chain
576574
if let Some(to_mine) = t
@@ -609,10 +607,6 @@ mod test {
609607
// apply update
610608
let mut updated_local_chain = local_chain.clone();
611609
updated_local_chain.apply_update(update)?;
612-
println!(
613-
"updated local chain height: {}",
614-
updated_local_chain.tip().height()
615-
);
616610

617611
assert!(
618612
{
@@ -773,7 +767,6 @@ mod test {
773767
];
774768

775769
for (i, t) in test_cases.into_iter().enumerate() {
776-
println!("Case {}: {}", i, t.name);
777770
let mut chain = t.chain;
778771

779772
let mock_anchors = t

crates/file_store/src/store.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ mod test {
340340

341341
for short_write_len in 1..last_changeset_bytes.len() - 1 {
342342
let file_path = temp_dir.path().join(format!("{}.dat", short_write_len));
343-
println!("Test file: {:?}", file_path);
344343

345344
// simulate creating a file, writing data where the last write is incomplete
346345
{
@@ -406,7 +405,6 @@ mod test {
406405

407406
for read_count in 0..changesets.len() {
408407
let file_path = temp_dir.path().join(format!("{}.dat", read_count));
409-
println!("Test file: {:?}", file_path);
410408

411409
// First, we create the file with all the changesets!
412410
let mut db = Store::<TestChangeSet>::create_new(&TEST_MAGIC_BYTES, &file_path).unwrap();

crates/wallet/src/wallet/coin_selection.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,6 @@ mod test {
15791579
];
15801580

15811581
for (i, t) in test_cases.into_iter().enumerate() {
1582-
println!("Case {}: {}", i, t.name);
15831582
let (required, optional) =
15841583
filter_duplicates(to_utxo_vec(t.required), to_utxo_vec(t.optional));
15851584
assert_eq!(

0 commit comments

Comments
 (0)