mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
[refactor] use CheckPackageLimits for checkChainLimits
The behavior is the same as CalculateMemPoolAncestors. The only difference is the string returned, and the string is discarded anyway since checkChainLimits only cares about pass/fail.
This commit is contained in:
@@ -703,9 +703,9 @@ public:
|
|||||||
if (!m_node.mempool) return true;
|
if (!m_node.mempool) return true;
|
||||||
LockPoints lp;
|
LockPoints lp;
|
||||||
CTxMemPoolEntry entry(tx, 0, 0, 0, 0, false, 0, lp);
|
CTxMemPoolEntry entry(tx, 0, 0, 0, 0, false, 0, lp);
|
||||||
const CTxMemPool::Limits& limits{m_node.mempool->m_limits};
|
|
||||||
LOCK(m_node.mempool->cs);
|
LOCK(m_node.mempool->cs);
|
||||||
return m_node.mempool->CalculateMemPoolAncestors(entry, limits).has_value();
|
std::string err_string;
|
||||||
|
return m_node.mempool->CheckPackageLimits({tx}, entry.GetTxSize(), err_string);
|
||||||
}
|
}
|
||||||
CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override
|
CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user