aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/txorphan.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-02-25 00:28:16 +1000
committerAnthony Towns <aj@erisian.com.au>2022-10-11 14:05:09 +1000
commita936f41a5d5f7bb97425f82ec64dfae62e840a56 (patch)
treea7d8e962139d566375a83ee191af3c204a7e8f0f /src/test/fuzz/txorphan.cpp
parent3614819864a84ac32f6d53c6ace79b5e71bc174a (diff)
txorphanage: make m_peer_work_set private
Diffstat (limited to 'src/test/fuzz/txorphan.cpp')
-rw-r--r--src/test/fuzz/txorphan.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/test/fuzz/txorphan.cpp b/src/test/fuzz/txorphan.cpp
index 730e814e1d..b200f94144 100644
--- a/src/test/fuzz/txorphan.cpp
+++ b/src/test/fuzz/txorphan.cpp
@@ -89,11 +89,17 @@ FUZZ_TARGET_INIT(txorphan, initialize_orphanage)
orphanage.AddChildrenToWorkSet(*tx, peer_id);
},
[&] {
- bool have_tx = orphanage.HaveTx(GenTxid::Txid(tx->GetHash())) || orphanage.HaveTx(GenTxid::Wtxid(tx->GetHash()));
{
LOCK(g_cs_orphans);
- bool get_tx = orphanage.GetTx(tx->GetHash()).first != nullptr;
- Assert(have_tx == get_tx);
+ NodeId originator;
+ bool more = true;
+ CTransactionRef ref = orphanage.GetTxToReconsider(peer_id, originator, more);
+ if (!ref) {
+ Assert(!more);
+ } else {
+ bool have_tx = orphanage.HaveTx(GenTxid::Txid(ref->GetHash())) || orphanage.HaveTx(GenTxid::Wtxid(ref->GetHash()));
+ Assert(have_tx);
+ }
}
},
[&] {