mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 12:10:19 +01:00
refactor: mempool: use CTxMempool::Limits
Simplifies function signatures by removing repetition of all the ancestor/descendant limits, and increases readability by being more verbose by naming the limits, while still reducing the LoC.
This commit is contained in:
@@ -660,8 +660,7 @@ public:
|
||||
std::string unused_error_string;
|
||||
LOCK(m_node.mempool->cs);
|
||||
return m_node.mempool->CalculateMemPoolAncestors(
|
||||
entry, ancestors, limits.ancestor_count, limits.ancestor_size_vbytes,
|
||||
limits.descendant_count, limits.descendant_size_vbytes, unused_error_string);
|
||||
entry, ancestors, limits, unused_error_string);
|
||||
}
|
||||
CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override
|
||||
{
|
||||
|
||||
@@ -396,9 +396,8 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele
|
||||
}
|
||||
|
||||
CTxMemPool::setEntries ancestors;
|
||||
uint64_t nNoLimit = std::numeric_limits<uint64_t>::max();
|
||||
std::string dummy;
|
||||
mempool.CalculateMemPoolAncestors(*iter, ancestors, nNoLimit, nNoLimit, nNoLimit, nNoLimit, dummy, false);
|
||||
mempool.CalculateMemPoolAncestors(*iter, ancestors, CTxMemPool::Limits::NoLimits(), dummy, false);
|
||||
|
||||
onlyUnconfirmed(ancestors);
|
||||
ancestors.insert(iter);
|
||||
|
||||
Reference in New Issue
Block a user