Skip to content

Commit e3bd51e

Browse files
committed
[doc] how unique_parents can be empty
1 parent 32eb6dc commit e3bd51e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/node/txdownloadman_impl.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ bool TxDownloadManagerImpl::AddTxAnnouncement(NodeId peer, const GenTxid& gtxid,
186186
return AlreadyHaveTx(GenTxid::Txid(txid), /*include_reconsiderable=*/false);
187187
});
188188

189-
if (unique_parents.empty()) return true;
189+
// The missing parents may have all been rejected or accepted since the orphan was added to the orphanage.
190+
// Do not delete from the orphanage, as it may be queued for processing.
191+
if (unique_parents.empty()) {
192+
return true;
193+
}
190194

191195
if (MaybeAddOrphanResolutionCandidate(unique_parents, wtxid, peer, now)) {
192196
m_orphanage.AddAnnouncer(orphan_tx->GetWitnessHash(), peer);

0 commit comments

Comments
 (0)