Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
slanesuke committed Apr 22, 2024
1 parent 5bf2335 commit a08694f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mine-your-first-block/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fn create_coinbase_tx(total_tx_fee: u64, mut witness_root_vec: Vec<String>) -> T
coinbase_tx.version = 1;

// witness data
let witness_reserved_value = "0000000000000000000000000000000000000000000000000000000000000000";
let witness_reserved_value = "0000000000000000000000000000000000000000000000000000000000000000".to_string();

let txid= "0000000000000000000000000000000000000000000000000000000000000000";
// input count is 1 byte 01
Expand Down Expand Up @@ -148,7 +148,7 @@ fn create_coinbase_tx(total_tx_fee: u64, mut witness_root_vec: Vec<String>) -> T
let mut witness_root_hash_bytes = hex::decode(witness_root_hash).unwrap();
//witness_root_hash_bytes.reverse(); // Reverse to match endianness maybe dont need this??

let reserved_value = vec![0; 32]; // 32 bytes of zeros
let reserved_value = hex::decode(witness_reserved_value).unwrap();
let mut commitment_payload = Vec::new();
commitment_payload.extend_from_slice(&witness_root_hash_bytes);
commitment_payload.extend_from_slice(&reserved_value);
Expand Down

0 comments on commit a08694f

Please sign in to comment.