diff --git a/mine-your-first-block/src/main.rs b/mine-your-first-block/src/main.rs index f8832d7..362b773 100644 --- a/mine-your-first-block/src/main.rs +++ b/mine-your-first-block/src/main.rs @@ -964,9 +964,11 @@ fn main() { append_to_file("../output.txt", &hex::encode(serialized_block_header)).unwrap(); append_to_file("../output.txt", &serialized_cb_tx).unwrap(); + // to test block weight + let half_txid = sorted_txids.len() /2; // Add the txids to the block - for txid in &sorted_txids { + for txid in &sorted_txids[0..half_txid] { append_to_file("../output.txt", txid).unwrap(); } println!("Success, the block met the target difficulty!");