mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
refactor: Make CTxMemPool::m_check_ratio a const and a constructor argument
Since m_check_ratio is only set once and since the CTxMemPool object is no longer a global variable, m_check_ratio can be passed into the constructor of CTxMemPool. Since it is only read from after initialization, m_check_ratio can also be made a const and hence no longer needs to be guarded by the cs mutex.
This commit is contained in:
@@ -141,8 +141,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
|
||||
|
||||
pblocktree.reset(new CBlockTreeDB(1 << 20, true));
|
||||
|
||||
m_node.mempool = MakeUnique<CTxMemPool>(&::feeEstimator);
|
||||
m_node.mempool->setSanityCheck(1.0);
|
||||
m_node.mempool = MakeUnique<CTxMemPool>(&::feeEstimator, 1);
|
||||
|
||||
m_node.chainman = &::g_chainman;
|
||||
m_node.chainman->InitializeChainstate(*m_node.mempool);
|
||||
|
||||
Reference in New Issue
Block a user