From eb6842aecb80b9d55ced0a5fe2669b7abd26eb21 Mon Sep 17 00:00:00 2001 From: Ian Slane Date: Sun, 21 Apr 2024 23:47:25 -0600 Subject: [PATCH] test --- mine-your-first-block/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mine-your-first-block/src/main.rs b/mine-your-first-block/src/main.rs index cb749f3..79e3ff4 100644 --- a/mine-your-first-block/src/main.rs +++ b/mine-your-first-block/src/main.rs @@ -1383,7 +1383,6 @@ fn main() { let serialized_block_header = serialize_block_header(&block_header); // Calculate the hash of the block header - //let block_hash = calculate_hash(serialized_block_header.clone()); let block_hash = double_sha256(serialized_block_header.clone()); let mut block_h = block_hash; block_h.reverse(); @@ -1408,6 +1407,12 @@ fn write_block_to_file(serialized_header: &[u8], serialized_cb_tx: &[u8], txs: V for tx in block_txs { append_to_file("../output.txt", &tx.txid).unwrap(); } + + for wtxid in block_txs { + if let Some(wtxid) = &wtxid.wtxid { + println!("{}", wtxid); + } + } }