From 3154df32e730c848a3dca35a1bb954e8bb084de6 Mon Sep 17 00:00:00 2001 From: Ian Slane Date: Mon, 22 Apr 2024 00:56:31 -0600 Subject: [PATCH] test --- mine-your-first-block/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mine-your-first-block/src/main.rs b/mine-your-first-block/src/main.rs index c3e1ca1..137164e 100644 --- a/mine-your-first-block/src/main.rs +++ b/mine-your-first-block/src/main.rs @@ -1360,14 +1360,16 @@ fn main() { // Generate coinbase tx let coinbase_tx = create_coinbase_tx(total_fees, wtx_ids_for_witness_root.clone()); - // let serialized_cb_tx = serialize_tx(&coinbase_tx); let serialized_cb_tx = serialized_segwit_tx(&coinbase_tx); + println!("Coinbase tx: {}", serialized_cb_tx); let cd_tx_bytes = hex::decode(serialized_cb_tx.clone()).unwrap(); // coinbase txid + println!("Coinbase tx befoore hash: {}", hex::encode(cd_tx_bytes.clone())); let coinbase_txid = double_sha256(cd_tx_bytes.clone()); let mut coinbase_txid_le = coinbase_txid.to_vec(); coinbase_txid_le.reverse(); let coinbase_txid = hex::encode(coinbase_txid_le); + println!("Coinbase txid: {}", coinbase_txid); // Insert the coinbase transaction at the beginning of block_txs let coinbase_tx_for_processing = TransactionForProcessing {