mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 09:43:55 +02:00
[refactor] TxOrphanage::EraseTx by wtxid
No behavior change right now, as transactions in the orphanage are unique by txid. This makes the next commit easier to review.
This commit is contained in:
@@ -137,12 +137,12 @@ FUZZ_TARGET(txorphan, .init = initialize_orphanage)
|
||||
bool have_tx = orphanage.HaveTx(tx->GetWitnessHash());
|
||||
// EraseTx should return 0 if m_orphans doesn't have the tx
|
||||
{
|
||||
Assert(have_tx == orphanage.EraseTx(tx->GetHash()));
|
||||
Assert(have_tx == orphanage.EraseTx(tx->GetWitnessHash()));
|
||||
}
|
||||
have_tx = orphanage.HaveTx(tx->GetWitnessHash());
|
||||
// have_tx should be false and EraseTx should fail
|
||||
{
|
||||
Assert(!have_tx && !orphanage.EraseTx(tx->GetHash()));
|
||||
Assert(!have_tx && !orphanage.EraseTx(tx->GetWitnessHash()));
|
||||
}
|
||||
},
|
||||
[&] {
|
||||
|
||||
Reference in New Issue
Block a user