aboutsummaryrefslogtreecommitdiff
path: root/src/bench/wallet_balance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bench/wallet_balance.cpp')
-rw-r--r--src/bench/wallet_balance.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/bench/wallet_balance.cpp b/src/bench/wallet_balance.cpp
index b385cec085..c96ef209e3 100644
--- a/src/bench/wallet_balance.cpp
+++ b/src/bench/wallet_balance.cpp
@@ -14,30 +14,24 @@
static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const bool add_watchonly, const bool add_mine)
{
- TestingSetup test_setup{
- CBaseChainParams::REGTEST,
- /* extra_args */ {
- "-nodebuglogfile",
- "-nodebug",
- },
- };
+ const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
const auto& ADDRESS_WATCHONLY = ADDRESS_BCRT1_UNSPENDABLE;
- CWallet wallet{test_setup.m_node.chain.get(), "", CreateMockWalletDatabase()};
+ CWallet wallet{test_setup->m_node.chain.get(), "", CreateMockWalletDatabase()};
{
wallet.SetupLegacyScriptPubKeyMan();
bool first_run;
if (wallet.LoadWallet(first_run) != DBErrors::LOAD_OK) assert(false);
}
- auto handler = test_setup.m_node.chain->handleNotifications({&wallet, [](CWallet*) {}});
+ auto handler = test_setup->m_node.chain->handleNotifications({&wallet, [](CWallet*) {}});
const Optional<std::string> address_mine{add_mine ? Optional<std::string>{getnewaddress(wallet)} : nullopt};
if (add_watchonly) importaddress(wallet, ADDRESS_WATCHONLY);
for (int i = 0; i < 100; ++i) {
- generatetoaddress(test_setup.m_node, address_mine.value_or(ADDRESS_WATCHONLY));
- generatetoaddress(test_setup.m_node, ADDRESS_WATCHONLY);
+ generatetoaddress(test_setup->m_node, address_mine.value_or(ADDRESS_WATCHONLY));
+ generatetoaddress(test_setup->m_node, ADDRESS_WATCHONLY);
}
SyncWithValidationInterfaceQueue();