diff --git a/mine-your-first-block/src/main.rs b/mine-your-first-block/src/main.rs index e60c0f0..cbd7dfd 100644 --- a/mine-your-first-block/src/main.rs +++ b/mine-your-first-block/src/main.rs @@ -141,8 +141,7 @@ 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 mut wtxid_items_bytes = hex::decode(concantinated_items).unwrap(); - wtxid_items_bytes.reverse(); + let wtxid_items_bytes = hex::decode(concantinated_items).unwrap(); 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);