[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:
glozow authored and TheCharlatan committed 2023-11-10 16:44:37 +01:00
1 parent dbc5bdbf59
commit 1bf4855016
1 file changed
+2 -2
+2 -2
View File
@@ -703,9 +703,9 @@ public:
if (!m_node.mempool) return true;
LockPoints 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);
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
{