From f0cd3e74076bb6932fb62950b5950e2a31d57a92 Mon Sep 17 00:00:00 2001 From: Ian Slane Date: Sun, 21 Apr 2024 13:01:08 -0600 Subject: [PATCH] test --- mine-your-first-block/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mine-your-first-block/src/main.rs b/mine-your-first-block/src/main.rs index 3d5a359..b19c892 100644 --- a/mine-your-first-block/src/main.rs +++ b/mine-your-first-block/src/main.rs @@ -78,7 +78,7 @@ struct BlockHeader { } /// This function will return the coinbase transaction -fn create_coinbase_tx(total_tx_fee: u64, witness_root_vec: Vec) -> Transaction { +fn create_coinbase_tx(total_tx_fee: u64, mut witness_root_vec: Vec) -> Transaction { let mut coinbase_tx = Transaction { version: 0, locktime: 0, @@ -142,7 +142,7 @@ fn create_coinbase_tx(total_tx_fee: u64, witness_root_vec: Vec) -> Trans // the witness root hash gets hashed with the witness reserve value and put into // the scriptpubkey of the second output // Made some edits to work directly with bytes so i didnt have to decode and encode - + witness_root_vec.insert(0, witness_reserved_value.to_string()); let witness_root_hash = get_merkle_root(witness_root_vec); let mut witness_root_hash_bytes = hex::decode(witness_root_hash).unwrap();