File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -102,16 +102,15 @@ static void ComplexMemPool(benchmark::Bench& bench)
102102static void MempoolCheck (benchmark::Bench& bench)
103103{
104104 FastRandomContext det_rand{true };
105- const int childTxs = bench.complexityN () > 1 ? static_cast <int >(bench.complexityN ()) : 2000 ;
106- const std::vector<CTransactionRef> ordered_coins = CreateOrderedCoins (det_rand, childTxs, /* min_ancestors=*/ 5 );
107- const auto testing_setup = MakeNoLogFileContext<const TestingSetup>(CBaseChainParams::MAIN, {" -checkmempool=1" });
108- CTxMemPool pool;
105+ auto testing_setup = MakeNoLogFileContext<TestChain100Setup>(CBaseChainParams::REGTEST, {" -checkmempool=1" });
106+ CTxMemPool& pool = *testing_setup.get ()->m_node .mempool ;
109107 LOCK2 (cs_main, pool.cs );
108+ testing_setup->PopulateMempool (det_rand, 400 , true );
110109 const CCoinsViewCache& coins_tip = testing_setup.get ()->m_node .chainman ->ActiveChainstate ().CoinsTip ();
111- for (auto & tx : ordered_coins) AddTx (tx, pool);
112110
113111 bench.run ([&]() NO_THREAD_SAFETY_ANALYSIS {
114- pool.check (coins_tip, /* spendheight=*/ 2 );
112+ // Bump up the spendheight so we don't hit premature coinbase spend errors.
113+ pool.check (coins_tip, /* spendheight=*/ 300 );
115114 });
116115}
117116
You can’t perform that action at this time.
0 commit comments