Remove mapLinks in favor of entry inlined structs with iterator type erasure

This commit is contained in:
Jeremy Rubin
2020-01-21 13:48:57 -08:00
parent 23d3ae7acc
commit 46d955d196
5 changed files with 128 additions and 112 deletions

View File

@@ -1776,11 +1776,11 @@ void static ProcessGetData(CNode& pfrom, const CChainParams& chainparams, CConnm
LOCK(mempool.cs);
auto txiter = mempool.GetIter(tx->GetHash());
if (txiter) {
const CTxMemPool::setEntries& parents = mempool.GetMemPoolParents(*txiter);
const CTxMemPoolEntry::Parents& parents = (*txiter)->GetMemPoolParentsConst();
parent_ids_to_add.reserve(parents.size());
for (CTxMemPool::txiter parent_iter : parents) {
if (parent_iter->GetTime() > now - UNCONDITIONAL_RELAY_DELAY) {
parent_ids_to_add.push_back(parent_iter->GetTx().GetHash());
for (const CTxMemPoolEntry& parent : parents) {
if (parent.GetTime() > now - UNCONDITIONAL_RELAY_DELAY) {
parent_ids_to_add.push_back(parent.GetTx().GetHash());
}
}
}