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); + } + } }