From c8e2ce4caf91ad76eb544f5662e33cada872be19 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 19 Feb 2022 01:02:25 -0800 Subject: [PATCH] Print block transaction count (#146) --- src/index.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.rs b/src/index.rs index d92bb5e813..7f5d297317 100644 --- a/src/index.rs +++ b/src/index.rs @@ -106,8 +106,6 @@ impl Index { .map(|(height, _hash)| height + 1) .unwrap_or(0); - log::info!("Indexing block at height {height}…"); - let block = match self.block(height)? { Some(block) => block, None => { @@ -116,6 +114,11 @@ impl Index { } }; + log::info!( + "Indexing block {height} with {} transactions…", + block.txdata.len() + ); + if let Some(prev_height) = height.checked_sub(1) { let prev_hash = height_to_hash.get(&prev_height)?.unwrap();