aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/setup_common.cpp
diff options
context:
space:
mode:
authorElle Mouton <elle.mouton@gmail.com>2020-10-20 20:42:47 +0200
committerElle Mouton <elle.mouton@gmail.com>2020-10-23 14:41:30 +0200
commite3310692d0e9720e960b9785274ce1f0b58b4cd7 (patch)
treeb110b230110db9e2a9616a83cb8c3b545dbdb01d /src/test/util/setup_common.cpp
parent9d4b4b2c2c49774523de740d6492ee5b1ee15e74 (diff)
downloadbitcoin-e3310692d0e9720e960b9785274ce1f0b58b4cd7.tar.xz
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.
Diffstat (limited to 'src/test/util/setup_common.cpp')
-rw-r--r--src/test/util/setup_common.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index 2d3137e1e2..adf5970206 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -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);