net_processing: Don't process tx after processing orphans

If we made progress on orphans, consider that enough work for this peer
for this round of ProcessMessages. This also allows cleaning up the api
for TxOrphange:GetTxToReconsider().
This commit is contained in:
Anthony Towns
2023-01-25 18:13:00 +10:00
parent c583775706
commit ecb0a3e425
4 changed files with 21 additions and 26 deletions

View File

@@ -89,11 +89,8 @@ FUZZ_TARGET_INIT(txorphan, initialize_orphanage)
},
[&] {
{
bool more = true;
CTransactionRef ref = orphanage.GetTxToReconsider(peer_id, more);
if (!ref) {
Assert(!more);
} else {
CTransactionRef ref = orphanage.GetTxToReconsider(peer_id);
if (ref) {
bool have_tx = orphanage.HaveTx(GenTxid::Txid(ref->GetHash())) || orphanage.HaveTx(GenTxid::Wtxid(ref->GetHash()));
Assert(have_tx);
}