@@ -65,21 +65,16 @@ static void CoinSelection(benchmark::Bench& bench)
65
65
}
66
66
67
67
typedef 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;
72
68
73
69
// Copied from src/wallet/test/coinselector_tests.cpp
74
70
static void add_coin (const CAmount& nValue, int nInput, std::vector<OutputGroup>& set)
75
71
{
76
72
CMutableTransaction tx;
77
73
tx.vout .resize (nInput + 1 );
78
74
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 );
80
76
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 );
83
78
}
84
79
// Copied from src/wallet/test/coinselector_tests.cpp
85
80
static 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)
97
92
static void BnBExhaustion (benchmark::Bench& bench)
98
93
{
99
94
// Setup
100
- testWallet.SetupLegacyScriptPubKeyMan ();
101
95
std::vector<OutputGroup> utxo_pool;
102
96
CoinSet selection;
103
97
CAmount value_ret = 0 ;
0 commit comments