mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-29 15:45:00 +02:00
orphanage: avoid vtx iteration when no orphans
This commit is contained in:
@@ -567,6 +567,8 @@ bool TxOrphanageImpl::HaveTxToReconsider(NodeId peer)
|
|||||||
}
|
}
|
||||||
void TxOrphanageImpl::EraseForBlock(const CBlock& block)
|
void TxOrphanageImpl::EraseForBlock(const CBlock& block)
|
||||||
{
|
{
|
||||||
|
if (m_orphans.empty()) return;
|
||||||
|
|
||||||
std::set<Wtxid> wtxids_to_erase;
|
std::set<Wtxid> wtxids_to_erase;
|
||||||
for (const CTransactionRef& ptx : block.vtx) {
|
for (const CTransactionRef& ptx : block.vtx) {
|
||||||
const CTransaction& block_tx = *ptx;
|
const CTransaction& block_tx = *ptx;
|
||||||
|
Reference in New Issue
Block a user