Skip to content

Commit 249889b

Browse files
furszyl0rinc
authored andcommitted
orphanage: avoid vtx iteration when no orphans
1 parent 41ad2be commit 249889b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/node/txorphanage.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ bool TxOrphanageImpl::HaveTxToReconsider(NodeId peer)
567567
}
568568
void TxOrphanageImpl::EraseForBlock(const CBlock& block)
569569
{
570+
if (m_orphans.empty()) return;
571+
570572
std::set<Wtxid> wtxids_to_erase;
571573
for (const CTransactionRef& ptx : block.vtx) {
572574
const CTransaction& block_tx = *ptx;

0 commit comments

Comments
 (0)