From ecb0a3e4259b81d6bb74d59a58eb65552c17d8d8 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Wed, 25 Jan 2023 18:13:00 +1000 Subject: 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(). --- src/txorphanage.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/txorphanage.cpp') diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp index 31c6ff7106..f82cd886f9 100644 --- a/src/txorphanage.cpp +++ b/src/txorphanage.cpp @@ -174,7 +174,7 @@ bool TxOrphanage::HaveTx(const GenTxid& gtxid) const } } -CTransactionRef TxOrphanage::GetTxToReconsider(NodeId peer, bool& more) +CTransactionRef TxOrphanage::GetTxToReconsider(NodeId peer) { LOCK(m_mutex); @@ -187,12 +187,10 @@ CTransactionRef TxOrphanage::GetTxToReconsider(NodeId peer, bool& more) const auto orphan_it = m_orphans.find(txid); if (orphan_it != m_orphans.end()) { - more = !work_set.empty(); return orphan_it->second.tx; } } } - more = false; return nullptr; } -- cgit v1.2.3