mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
p2p: reconsider orphans when missing inputs are mined
This commit is contained in:
@@ -100,6 +100,9 @@ void TxDownloadManagerImpl::BlockConnected(const std::shared_ptr<const CBlock>&
|
||||
m_orphanage->EraseForBlock(*pblock);
|
||||
|
||||
for (const auto& ptx : pblock->vtx) {
|
||||
// Reconsider potential child transactions.
|
||||
m_orphanage->AddChildrenToWorkSet(*ptx, m_opts.m_rng);
|
||||
|
||||
RecentConfirmedTransactionsFilter().insert(ptx->GetHash().ToUint256());
|
||||
if (ptx->HasWitness()) {
|
||||
RecentConfirmedTransactionsFilter().insert(ptx->GetWitnessHash().ToUint256());
|
||||
|
||||
@@ -531,6 +531,8 @@ void TxOrphanageImpl::LimitOrphans()
|
||||
|
||||
std::vector<std::pair<Wtxid, NodeId>> TxOrphanageImpl::AddChildrenToWorkSet(const CTransaction& tx, FastRandomContext& rng)
|
||||
{
|
||||
if (m_orphans.empty()) return {};
|
||||
|
||||
std::vector<std::pair<Wtxid, NodeId>> ret;
|
||||
auto& index_by_wtxid = m_orphans.get<ByWtxid>();
|
||||
for (unsigned int i = 0; i < tx.vout.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user