@@ -91,21 +91,21 @@ FUZZ_TARGET(txorphan, .init = initialize_orphanage)
9191 {
9292 CTransactionRef ref = orphanage.GetTxToReconsider (peer_id);
9393 if (ref) {
94- bool have_tx = orphanage.HaveTx (GenTxid::Txid (ref->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (ref->GetHash ()));
94+ bool have_tx = orphanage.HaveTx (GenTxid::Txid (ref->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (ref->GetWitnessHash ()));
9595 Assert (have_tx);
9696 }
9797 }
9898 },
9999 [&] {
100- bool have_tx = orphanage.HaveTx (GenTxid::Txid (tx->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (tx->GetHash ()));
100+ bool have_tx = orphanage.HaveTx (GenTxid::Txid (tx->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (tx->GetWitnessHash ()));
101101 // AddTx should return false if tx is too big or already have it
102102 // tx weight is unknown, we only check when tx is already in orphanage
103103 {
104104 bool add_tx = orphanage.AddTx (tx, peer_id);
105105 // have_tx == true -> add_tx == false
106106 Assert (!have_tx || !add_tx);
107107 }
108- have_tx = orphanage.HaveTx (GenTxid::Txid (tx->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (tx->GetHash ()));
108+ have_tx = orphanage.HaveTx (GenTxid::Txid (tx->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (tx->GetWitnessHash ()));
109109 {
110110 bool add_tx = orphanage.AddTx (tx, peer_id);
111111 // if have_tx is still false, it must be too big
@@ -114,12 +114,12 @@ FUZZ_TARGET(txorphan, .init = initialize_orphanage)
114114 }
115115 },
116116 [&] {
117- bool have_tx = orphanage.HaveTx (GenTxid::Txid (tx->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (tx->GetHash ()));
117+ bool have_tx = orphanage.HaveTx (GenTxid::Txid (tx->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (tx->GetWitnessHash ()));
118118 // EraseTx should return 0 if m_orphans doesn't have the tx
119119 {
120120 Assert (have_tx == orphanage.EraseTx (tx->GetHash ()));
121121 }
122- have_tx = orphanage.HaveTx (GenTxid::Txid (tx->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (tx->GetHash ()));
122+ have_tx = orphanage.HaveTx (GenTxid::Txid (tx->GetHash ())) || orphanage.HaveTx (GenTxid::Wtxid (tx->GetWitnessHash ()));
123123 // have_tx should be false and EraseTx should fail
124124 {
125125 Assert (!have_tx && !orphanage.EraseTx (tx->GetHash ()));
0 commit comments