mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
mempool: Pass in -maxmempool instead of referencing gArgs
- Store the mempool size limit (-maxmempool) in CTxMemPool as a member.
- Remove the requirement to explicitly specify a mempool size limit for
CTxMemPool::GetMinFee(...) and LimitMempoolSize(...), just use the
stored mempool size limit where possible.
- Remove all now-unnecessary instances of:
gArgs.GetIntArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE_MB) * 1000000
The code change in CChainState::GetCoinsCacheSizeState() is correct
since the coinscache should not repurpose "extra" mempool memory
headroom for itself if the mempool doesn't even exist.
This commit is contained in:
parent
f1941e8bfd
commit
82f00de7a6
10 changed files with 25 additions and 16 deletions
|
|
@ -4599,7 +4599,7 @@ void PeerManagerImpl::MaybeSendFeefilter(CNode& pto, Peer& peer, std::chrono::mi
|
|||
// transactions to us, regardless of feefilter state.
|
||||
if (pto.IsBlockOnlyConn()) return;
|
||||
|
||||
CAmount currentFilter = m_mempool.GetMinFee(gArgs.GetIntArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE_MB) * 1000000).GetFeePerK();
|
||||
CAmount currentFilter = m_mempool.GetMinFee().GetFeePerK();
|
||||
static FeeFilterRounder g_filter_rounder{CFeeRate{DEFAULT_MIN_RELAY_TX_FEE}};
|
||||
|
||||
if (m_chainman.ActiveChainstate().IsInitialBlockDownload()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue