diff --git a/src/node/txorphanage.cpp b/src/node/txorphanage.cpp index 6093be46ce4..ce087d17ffb 100644 --- a/src/node/txorphanage.cpp +++ b/src/node/txorphanage.cpp @@ -567,6 +567,8 @@ bool TxOrphanageImpl::HaveTxToReconsider(NodeId peer) } void TxOrphanageImpl::EraseForBlock(const CBlock& block) { + if (m_orphans.empty()) return; + std::set wtxids_to_erase; for (const CTransactionRef& ptx : block.vtx) { const CTransaction& block_tx = *ptx;