Skip to content

Commit

Permalink
Print block transaction count (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Feb 19, 2022
1 parent 5e69ebc commit c8e2ce4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -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();

Expand Down

0 comments on commit c8e2ce4

Please sign in to comment.