orphanage: avoid vtx iteration when no orphans

This commit is contained in:
furszy authored and Lőrinc committed 2025-07-18 16:54:16 -07:00
1 parent 41ad2be434
commit 249889bee6
1 file changed
+2
+2
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;