Skip to content

Commit 38af2bc

Browse files
committed
mempoolaccept: Use limits from mempool in constructor
1 parent 9333427 commit 38af2bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/validation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,10 @@ class MemPoolAccept
425425
{
426426
public:
427427
explicit MemPoolAccept(CTxMemPool& mempool, CChainState& active_chainstate) : m_pool(mempool), m_view(&m_dummy), m_viewmempool(&active_chainstate.CoinsTip(), m_pool), m_active_chainstate(active_chainstate),
428-
m_limit_ancestors(gArgs.GetIntArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT)),
429-
m_limit_ancestor_size(gArgs.GetIntArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT_KVB)*1000),
430-
m_limit_descendants(gArgs.GetIntArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT)),
431-
m_limit_descendant_size(gArgs.GetIntArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT_KVB)*1000) {
428+
m_limit_ancestors(m_pool.m_limits.ancestor_count),
429+
m_limit_ancestor_size(m_pool.m_limits.ancestor_size_vbytes),
430+
m_limit_descendants(m_pool.m_limits.descendant_count),
431+
m_limit_descendant_size(m_pool.m_limits.descendant_size_vbytes) {
432432
}
433433

434434
// We put the arguments we're handed into a struct, so we can pass them

0 commit comments

Comments
 (0)