mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
[doc] how unique_parents can be empty
This commit is contained in:
parent
32eb6dc758
commit
e3bd51e4b5
1 changed files with 5 additions and 1 deletions
|
@ -186,7 +186,11 @@ bool TxDownloadManagerImpl::AddTxAnnouncement(NodeId peer, const GenTxid& gtxid,
|
||||||
return AlreadyHaveTx(GenTxid::Txid(txid), /*include_reconsiderable=*/false);
|
return AlreadyHaveTx(GenTxid::Txid(txid), /*include_reconsiderable=*/false);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (unique_parents.empty()) return true;
|
// The missing parents may have all been rejected or accepted since the orphan was added to the orphanage.
|
||||||
|
// Do not delete from the orphanage, as it may be queued for processing.
|
||||||
|
if (unique_parents.empty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (MaybeAddOrphanResolutionCandidate(unique_parents, wtxid, peer, now)) {
|
if (MaybeAddOrphanResolutionCandidate(unique_parents, wtxid, peer, now)) {
|
||||||
m_orphanage.AddAnnouncer(orphan_tx->GetWitnessHash(), peer);
|
m_orphanage.AddAnnouncer(orphan_tx->GetWitnessHash(), peer);
|
||||||
|
|
Loading…
Add table
Reference in a new issue