@@ -65,21 +65,16 @@ static void CoinSelection(benchmark::Bench& bench)
6565}
6666
6767typedef std::set<CInputCoin> CoinSet;
68- static NodeContext testNode;
69- static auto testChain = interfaces::MakeChain(testNode);
70- static CWallet testWallet (testChain.get(), "", CreateDummyWalletDatabase());
71- std::vector<std::unique_ptr<CWalletTx>> wtxn;
7268
7369// Copied from src/wallet/test/coinselector_tests.cpp
7470static void add_coin (const CAmount& nValue, int nInput, std::vector<OutputGroup>& set)
7571{
7672 CMutableTransaction tx;
7773 tx.vout .resize (nInput + 1 );
7874 tx.vout [nInput].nValue = nValue;
79- std::unique_ptr<CWalletTx> wtx = std::make_unique<CWalletTx> (MakeTransactionRef (std::move ( tx)) );
75+ CInputCoin coin (MakeTransactionRef (tx), nInput );
8076 set.emplace_back ();
81- set.back ().Insert (COutput (testWallet, *wtx, nInput, 0 , true , true , true ).GetInputCoin (), 0 , true , 0 , 0 , false );
82- wtxn.emplace_back (std::move (wtx));
77+ set.back ().Insert (coin, 0 , true , 0 , 0 , false );
8378}
8479// Copied from src/wallet/test/coinselector_tests.cpp
8580static CAmount make_hard_case (int utxos, std::vector<OutputGroup>& utxo_pool)
@@ -97,7 +92,6 @@ static CAmount make_hard_case(int utxos, std::vector<OutputGroup>& utxo_pool)
9792static void BnBExhaustion (benchmark::Bench& bench)
9893{
9994 // Setup
100- testWallet.SetupLegacyScriptPubKeyMan ();
10195 std::vector<OutputGroup> utxo_pool;
10296 CoinSet selection;
10397 CAmount value_ret = 0 ;
0 commit comments