Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions prdoc/pr_4021.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: Improve log output for block imports

doc:
- audience: Node Operator
description: |
Nodes now print the parent hash on import notification log messages. In addition, the emoji
of the log message indicates whether the block was imported as best block or not. "🏆" is used for
best blocks, "🆕" for other imported blocks.

crates: [ ]
4 changes: 3 additions & 1 deletion substrate/client/informant/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ where
last_blocks.pop_front();
}

let best_indicator = if n.is_new_best { "🏆" } else { "🆕" };
info!(
target: "substrate",
" Imported #{} ({})",
"{best_indicator} Imported #{} ({} → {})",
format.print_with_color(Colour::White.bold(), n.header.number()),
n.header.parent_hash(),
n.hash,
);
}
Expand Down