From 118c51b7864cf3c3acbcd1bc9ffc4ad3ee7f7bad Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 19 Feb 2022 01:01:04 -0800 Subject: [PATCH] Print block transaction count --- 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();