Rewrite GetChildren without sets
This commit is contained in:
1 parent
3e39ea8c30
commit
9292570f4c
1 file changed
+4
-5
+4
-5
@@ -58,13 +58,12 @@ std::vector<CTxMemPoolEntry::CTxMemPoolEntryRef> CTxMemPool::GetChildren(const C
|
|||||||
{
|
{
|
||||||
LOCK(cs);
|
LOCK(cs);
|
||||||
std::vector<CTxMemPoolEntry::CTxMemPoolEntryRef> ret;
|
std::vector<CTxMemPoolEntry::CTxMemPoolEntryRef> ret;
|
||||||
setEntries children;
|
WITH_FRESH_EPOCH(m_epoch);
|
||||||
auto iter = mapNextTx.lower_bound(COutPoint(entry.GetTx().GetHash(), 0));
|
auto iter = mapNextTx.lower_bound(COutPoint(entry.GetTx().GetHash(), 0));
|
||||||
for (; iter != mapNextTx.end() && iter->first->hash == entry.GetTx().GetHash(); ++iter) {
|
for (; iter != mapNextTx.end() && iter->first->hash == entry.GetTx().GetHash(); ++iter) {
|
||||||
children.insert(iter->second);
|
if (!visited(iter->second)) {
|
||||||
}
|
ret.emplace_back(*(iter->second));
|
||||||
for (const auto& child : children) {
|
}
|
||||||
ret.emplace_back(*child);
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user