Skip to content

Commit 1bf4855

Browse files
glozowTheCharlatan
authored andcommitted
[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.
1 parent dbc5bdb commit 1bf4855

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node/interfaces.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,9 @@ class ChainImpl : public Chain
703703
if (!m_node.mempool) return true;
704704
LockPoints lp;
705705
CTxMemPoolEntry entry(tx, 0, 0, 0, 0, false, 0, lp);
706-
const CTxMemPool::Limits& limits{m_node.mempool->m_limits};
707706
LOCK(m_node.mempool->cs);
708-
return m_node.mempool->CalculateMemPoolAncestors(entry, limits).has_value();
707+
std::string err_string;
708+
return m_node.mempool->CheckPackageLimits({tx}, entry.GetTxSize(), err_string);
709709
}
710710
CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override
711711
{

0 commit comments

Comments
 (0)