mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
mempool: Remove unused function CalculateDescendantMaximum
This commit is contained in:
@@ -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
|
||||
{
|
||||
auto ancestors = m_txgraph->GetAncestors(entry, TxGraph::Level::MAIN);
|
||||
|
||||
@@ -284,8 +284,6 @@ public:
|
||||
|
||||
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> CalculateDescendantData(const CTxMemPoolEntry& entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user