orphanage: avoid vtx iteration when no orphans

This commit is contained in:
furszy
2025-06-11 10:19:19 -04:00
committed by Lőrinc
parent 41ad2be434
commit 249889bee6

View File

@@ -567,6 +567,8 @@ bool TxOrphanageImpl::HaveTxToReconsider(NodeId peer)
}
void TxOrphanageImpl::EraseForBlock(const CBlock& block)
{
if (m_orphans.empty()) return;
std::set<Wtxid> wtxids_to_erase;
for (const CTransactionRef& ptx : block.vtx) {
const CTransaction& block_tx = *ptx;