Skip to content

Commit

Permalink
chore: log timestamp when new block is mined.
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-da committed May 3, 2024
1 parent 10761a7 commit 64c46e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mine_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,15 @@ fn mine_block_worker(
coinbase_utxo_info: Box::new(coinbase_utxo_info),
};

let timestamp = new_block_found.block.kernel.header.timestamp;
let timestamp_standard = timestamp.standard_format();
let hash = new_block_found.block.hash();
let hex = hash.to_hex();
let height = new_block_found.block.kernel.header.height;
info!(
r#"Newly mined block details:
Height: {height}
Time: {timestamp_standard} ({timestamp})
Digest (Hex): {hex}
Digest (Raw): {hash}
Difficulty threshold: {threshold}
Expand Down

0 comments on commit 64c46e8

Please sign in to comment.