aboutsummaryrefslogtreecommitdiff
path: root/src/txorphanage.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2023-01-25 18:13:00 +1000
committerAnthony Towns <aj@erisian.com.au>2023-01-25 18:15:12 +1000
commitecb0a3e4259b81d6bb74d59a58eb65552c17d8d8 (patch)
tree876ac6f1c9bc0f0aa71cde58da1c2d386d634e45 /src/txorphanage.cpp
parentc5837757068bf8ea3e5b6fdad82f69d1deb81545 (diff)
downloadbitcoin-ecb0a3e4259b81d6bb74d59a58eb65552c17d8d8.tar.xz
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().
Diffstat (limited to 'src/txorphanage.cpp')
-rw-r--r--src/txorphanage.cpp4
1 files changed, 1 insertions, 3 deletions
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;
}