beacon/notifier: display block information for current slot (#1084)

This commit is contained in:
Raw Pong Ghmoa 2020-04-30 08:20:54 +02:00 committed by GitHub
parent 8bf0ef8d30
commit f4ac0422e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,6 +122,7 @@ pub fn spawn_notifier<T: BeaconChainTypes>(
); );
} else { } else {
if sync_state.is_synced() { if sync_state.is_synced() {
let block_info = if current_slot > head_slot { format!(" … empty") } else { format!("{}", head_root) };
info!( info!(
log_2, log_2,
"Synced"; "Synced";
@ -129,6 +130,7 @@ pub fn spawn_notifier<T: BeaconChainTypes>(
"finalized_root" => format!("{}", finalized_root), "finalized_root" => format!("{}", finalized_root),
"finalized_epoch" => finalized_epoch, "finalized_epoch" => finalized_epoch,
"epoch" => current_epoch, "epoch" => current_epoch,
"block" => block_info,
"slot" => current_slot, "slot" => current_slot,
); );
} else { } else {