Add header hash to block Display impl
@@ -26,6 +26,7 @@ use crate::{
blocks::{BlockHash, BlockHeader},
consensus::ConsensusConstants,
proof_of_work::ProofOfWork,
+ tari_utilities::hex::Hex,
transactions::{
aggregated_body::AggregateBody,
tari_amount::MicroTari,
@@ -116,6 +117,7 @@ impl Display for Block {
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
fmt.write_str("----------------- Block -----------------\n")?;
fmt.write_str("--- Header ---\n")?;
+ fmt.write_str(&format!("Hash: {}\n", self.header.hash().to_hex()))?;
fmt.write_str(&format!("{}\n", self.header))?;
fmt.write_str("--- Body ---\n")?;
fmt.write_str(&format!("{}\n", self.body))
