[p2p] assign just 1 random announcer in AddChildrenToWorkSet

This commit is contained in:
glozow
2025-01-21 17:59:37 -05:00
parent 4c1fa6b28c
commit 7426afbe62
5 changed files with 38 additions and 24 deletions

View File

@@ -333,7 +333,7 @@ void TxDownloadManagerImpl::MempoolAcceptedTx(const CTransactionRef& tx)
m_txrequest.ForgetTxHash(tx->GetHash());
m_txrequest.ForgetTxHash(tx->GetWitnessHash());
m_orphanage.AddChildrenToWorkSet(*tx);
m_orphanage.AddChildrenToWorkSet(*tx, m_opts.m_rng);
// If it came from the orphanage, remove it. No-op if the tx is not in txorphanage.
m_orphanage.EraseTx(tx->GetWitnessHash());
}