| 194 | |
| 195 | |
| 196 | static void MempoolCheck(benchmark::Bench& bench) |
| 197 | { |
| 198 | FastRandomContext det_rand{true}; |
| 199 | auto testing_setup = MakeNoLogFileContext<TestChain100Setup>(ChainType::REGTEST, {.extra_args = {"-checkmempool=1"}}); |
| 200 | CTxMemPool& pool = *testing_setup.get()->m_node.mempool; |
| 201 | LOCK2(cs_main, pool.cs); |
| 202 | testing_setup->PopulateMempool(det_rand, 400, true); |
| 203 | const CCoinsViewCache& coins_tip = testing_setup.get()->m_node.chainman->ActiveChainstate().CoinsTip(); |
| 204 | |
| 205 | bench.run([&]() NO_THREAD_SAFETY_ANALYSIS { |
| 206 | // Bump up the spendheight so we don't hit premature coinbase spend errors. |
| 207 | pool.check(coins_tip, /*spendheight=*/300); |
| 208 | }); |
| 209 | } |
| 210 | |
| 211 | BENCHMARK(MemPoolAncestorsDescendants); |
| 212 | BENCHMARK(MemPoolAddTransactions); |
nothing calls this directly
no test coverage detected