diff --git a/mine-your-first-block/src/main.rs b/mine-your-first-block/src/main.rs index 2f3fc20..dd445a8 100644 --- a/mine-your-first-block/src/main.rs +++ b/mine-your-first-block/src/main.rs @@ -1273,6 +1273,8 @@ fn main() { if let Some(ref wtxid) = tx.wtxid { wtx_ids_for_witness_root.push(wtxid.clone()); // Collect wtxid if valid } + } else { + wtx_ids_for_witness_root.push(tx.txid.clone()); // Collect txid if not p2wpkh } } diff --git a/output.txt b/output.txt index 505ddd1..f802aaa 100644 --- a/output.txt +++ b/output.txt @@ -1,6 +1,6 @@ -00000020c456e5488ee12dd326712b7efb70a3b0b19169b8e5050200000000000000000018024b5094bad3108b3a1a5a994a5acd6d3fcff87bd540753eed1906e6902230afaa2666ffff001f99430000 -000000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff0403837122ffffffff029a9c0f26000000001976a91406f1b66fd59a34755c37a8f701f43e937cdbeb1388ac0000000000000000266a24aa21a9ed7e5cd5cb328d34f23add6ee8047006422754a1267b7bd15a4fcfa489b1376c6c0120000000000000000000000000000000000000000000000000000000000000000000000000 -bfa5a70a33b5c3c71b03c0670208fcdf19e8bbaa2676600b2d84b7659aa71e60 +00000020c456e5488ee12dd326712b7efb70a3b0b19169b8e50502000000000000000000faf6ecce92e90aa12e9b9df284fa5d6f52365ccaf7930064cb8008cf735d20218e412766ffff001fc3d00000 +000000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff0403837122ffffffff029a9c0f26000000001976a91406f1b66fd59a34755c37a8f701f43e937cdbeb1388ac0000000000000000266a24aa21a9ed66abc01f371acd8705448f98932a686fee2bd86098186f04d20f085cfa2875b10120000000000000000000000000000000000000000000000000000000000000000000000000 +7b2fcc2cad60aefe115b28d56bfea476296d4a704445de781a48b6a4f0001f7c ac25ef46b37883c5698e9fa71d962b3f8d2a148e89c383c5a8b75172661efc38 7c27c9f3a5eb30dcb79327dcf49bda91201a45b74ebfa73fcc5ab67cdd3f9f55 741b1fc01c74f96d73f6fb8694d4922858ef73bbb216a9de29e5849fa74ca35b