aboutsummaryrefslogtreecommitdiff
path: root/src/bench/mempool_stress.cpp
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2021-09-29 19:36:01 +0100
committerglozow <gloriajzhao@gmail.com>2021-10-04 15:00:28 +0100
commit082c5bf099c64e3d27abe9b68a71ce500b693e7e (patch)
treede3cef3823de0046834bbf621ba3a32e2b09042d /src/bench/mempool_stress.cpp
parented6115f1eae0eb4669601106a9aaff078a2f3a74 (diff)
downloadbitcoin-082c5bf099c64e3d27abe9b68a71ce500b693e7e.tar.xz
[refactor] pass coinsview and height to check()
Removes check's dependency on validation.h
Diffstat (limited to 'src/bench/mempool_stress.cpp')
-rw-r--r--src/bench/mempool_stress.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bench/mempool_stress.cpp b/src/bench/mempool_stress.cpp
index 16c57881d4..a0a82ea359 100644
--- a/src/bench/mempool_stress.cpp
+++ b/src/bench/mempool_stress.cpp
@@ -107,10 +107,11 @@ static void MempoolCheck(benchmark::Bench& bench)
const auto testing_setup = MakeNoLogFileContext<const TestingSetup>(CBaseChainParams::MAIN, {"-checkmempool=1"});
CTxMemPool pool;
LOCK2(cs_main, pool.cs);
+ const CCoinsViewCache& coins_tip = testing_setup.get()->m_node.chainman->ActiveChainstate().CoinsTip();
for (auto& tx : ordered_coins) AddTx(tx, pool);
bench.run([&]() NO_THREAD_SAFETY_ANALYSIS {
- pool.check(testing_setup.get()->m_node.chainman->ActiveChainstate());
+ pool.check(coins_tip, /* spendheight */ 2);
});
}