mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-08 14:34:53 -05: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:
parent
dbc5bdbf59
commit
1bf4855016
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue