From a023e889d214c726ebacfc33355af1f1874e7a23 Mon Sep 17 00:00:00 2001 From: Ian Slane Date: Sat, 27 Apr 2024 21:53:06 -0600 Subject: [PATCH] cleaned up block.rs --- mine-your-first-block/src/block.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mine-your-first-block/src/block.rs b/mine-your-first-block/src/block.rs index 54ce3a9..05e6db5 100644 --- a/mine-your-first-block/src/block.rs +++ b/mine-your-first-block/src/block.rs @@ -31,7 +31,7 @@ pub fn create_coinbase_tx(total_tx_fee: u64, witness_root_vec: Vec) -> T let txid= "0000000000000000000000000000000000000000000000000000000000000000".to_string(); // input count is 1 byte 01 coinbase_tx.vin.push(Vin { - txid, + txid: txid.clone(), vout: 0xffffffff, prevout: Prevout { scriptpubkey: "".to_string(), @@ -42,7 +42,7 @@ pub fn create_coinbase_tx(total_tx_fee: u64, witness_root_vec: Vec) -> T }, scriptsig: block_scriptsig, scriptsig_asm: "OP_PUSHBYTES_3 837122".to_string(), - witness: Some(vec![txid]), + witness: Some(vec![txid.clone()]), is_coinbase: true, sequence: 0xffffffff, });