Skip to content

Commit f883e5f

Browse files
furszyjanus
authored andcommitted
orphanage: avoid vtx iteration when no orphans
1 parent 55ffa53 commit f883e5f

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
@@ -832,6 +832,8 @@ bool TxOrphanageImpl::HaveTxToReconsider(NodeId peer)
832832
}
833833
void TxOrphanageImpl::EraseForBlock(const CBlock& block)
834834
{
835+
if (m_orphans.empty()) return;
836+
835837
std::set<Wtxid> wtxids_to_erase;
836838
for (const CTransactionRef& ptx : block.vtx) {
837839
const CTransaction& block_tx = *ptx;

0 commit comments

Comments
 (0)