From 460f20d2e87c1effed7c9cf8e9d2ffd725580327 Mon Sep 17 00:00:00 2001 From: Ian Slane Date: Mon, 22 Apr 2024 20:57:44 -0600 Subject: [PATCH] testing --- mine-your-first-block/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mine-your-first-block/src/main.rs b/mine-your-first-block/src/main.rs index cbd7dfd..e60c0f0 100644 --- a/mine-your-first-block/src/main.rs +++ b/mine-your-first-block/src/main.rs @@ -141,7 +141,8 @@ fn create_coinbase_tx(total_tx_fee: u64, mut witness_root_vec: Vec) -> T let witness_root_hash = get_merkle_root(witness_root_vec); let concantinated_items = format!("{}{}", witness_root_hash, witness_reserved_value); - let wtxid_items_bytes = hex::decode(concantinated_items).unwrap(); + let mut wtxid_items_bytes = hex::decode(concantinated_items).unwrap(); + wtxid_items_bytes.reverse(); let wtxid_commitment_test = double_sha256(wtxid_items_bytes); let wtxid_commitment = hex::encode(wtxid_commitment_test); let scriptpubkey_for_wtxid_test = format!("6a24aa21a9ed{}", wtxid_commitment);