diff --git a/src/bench/coin_selection.cpp b/src/bench/coin_selection.cpp index 2f108a310b4..6d0d89e41cb 100644 --- a/src/bench/coin_selection.cpp +++ b/src/bench/coin_selection.cpp @@ -12,8 +12,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -26,19 +28,7 @@ #include #include -using node::NodeContext; -using wallet::AttemptSelection; -using wallet::CHANGE_LOWER; -using wallet::COutput; -using wallet::CWallet; -using wallet::CWalletTx; -using wallet::CoinEligibilityFilter; -using wallet::CoinSelectionParams; -using wallet::CreateMockableWalletDatabase; -using wallet::OutputGroup; -using wallet::SelectCoinsBnB; -using wallet::TxStateInactive; - +namespace wallet { static void addCoin(const CAmount& nValue, const CWallet& wallet, std::vector>& wtxs) { static int nextLockTime = 0; @@ -58,9 +48,8 @@ static void addCoin(const CAmount& nValue, const CWallet& wallet, std::vector(); + CWallet wallet(test_setup->m_node.chain.get(), "", CreateMockableWalletDatabase()); std::vector> wtxs; LOCK(wallet.cs_wallet); @@ -139,3 +128,4 @@ static void BnBExhaustion(benchmark::Bench& bench) BENCHMARK(CoinSelection); BENCHMARK(BnBExhaustion); +}; // namespace wallet