mempool: Remove unused function CalculateDescendantMaximum
This commit is contained in:
1 parent
8e49477e86
commit
ba09fc9774
2 files changed
-24
No files matched your search
@@ -1165,28 +1165,6 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<COutPoint>* pvNoSpends
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t CTxMemPool::CalculateDescendantMaximum(txiter entry) const {
|
|
||||||
// find parent with highest descendant count
|
|
||||||
std::vector<txiter> candidates;
|
|
||||||
setEntries counted;
|
|
||||||
candidates.push_back(entry);
|
|
||||||
uint64_t maximum = 0;
|
|
||||||
while (candidates.size()) {
|
|
||||||
txiter candidate = candidates.back();
|
|
||||||
candidates.pop_back();
|
|
||||||
if (!counted.insert(candidate).second) continue;
|
|
||||||
const CTxMemPoolEntry::Parents& parents = candidate->GetMemPoolParentsConst();
|
|
||||||
if (parents.size() == 0) {
|
|
||||||
maximum = std::max(maximum, candidate->GetCountWithDescendants());
|
|
||||||
} else {
|
|
||||||
for (const CTxMemPoolEntry& i : parents) {
|
|
||||||
candidates.push_back(mapTx.iterator_to(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return maximum;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::tuple<size_t, size_t, CAmount> CTxMemPool::CalculateAncestorData(const CTxMemPoolEntry& entry) const
|
std::tuple<size_t, size_t, CAmount> CTxMemPool::CalculateAncestorData(const CTxMemPoolEntry& entry) const
|
||||||
{
|
{
|
||||||
auto ancestors = m_txgraph->GetAncestors(entry, TxGraph::Level::MAIN);
|
auto ancestors = m_txgraph->GetAncestors(entry, TxGraph::Level::MAIN);
|
||||||
|
|||||||
@@ -284,8 +284,6 @@ public:
|
|||||||
|
|
||||||
using Limits = kernel::MemPoolLimits;
|
using Limits = kernel::MemPoolLimits;
|
||||||
|
|
||||||
uint64_t CalculateDescendantMaximum(txiter entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
|
||||||
|
|
||||||
std::tuple<size_t, size_t, CAmount> CalculateAncestorData(const CTxMemPoolEntry& entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
std::tuple<size_t, size_t, CAmount> CalculateAncestorData(const CTxMemPoolEntry& entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
std::tuple<size_t, size_t, CAmount> CalculateDescendantData(const CTxMemPoolEntry& entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
std::tuple<size_t, size_t, CAmount> CalculateDescendantData(const CTxMemPoolEntry& entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user