aboutsummaryrefslogtreecommitdiff
path: root/src/bench/wallet_balance.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-09 11:47:32 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-17 10:19:32 -0400
commitfab117096446ab63d1f38c1ef6edbc94a5d4ab52 (patch)
tree4a3e6d3eabb3c6990751f5a9b9f0100a6e27d1ee /src/bench/wallet_balance.cpp
parent54f812d9d29893c690ae06b84aaeab128186aa36 (diff)
downloadbitcoin-fab117096446ab63d1f38c1ef6edbc94a5d4ab52.tar.xz
bench: Remove requirement that all benches use RegTestingSetup
Diffstat (limited to 'src/bench/wallet_balance.cpp')
-rw-r--r--src/bench/wallet_balance.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bench/wallet_balance.cpp b/src/bench/wallet_balance.cpp
index 8be0aab1ff..05d61fca22 100644
--- a/src/bench/wallet_balance.cpp
+++ b/src/bench/wallet_balance.cpp
@@ -14,6 +14,7 @@
static void WalletBalance(benchmark::State& state, const bool set_dirty, const bool add_watchonly, const bool add_mine)
{
+ RegTestingSetup test_setup;
const auto& ADDRESS_WATCHONLY = ADDRESS_BCRT1_UNSPENDABLE;
NodeContext node;
@@ -30,8 +31,8 @@ static void WalletBalance(benchmark::State& state, const bool set_dirty, const b
if (add_watchonly) importaddress(wallet, ADDRESS_WATCHONLY);
for (int i = 0; i < 100; ++i) {
- generatetoaddress(g_testing_setup->m_node, address_mine.get_value_or(ADDRESS_WATCHONLY));
- generatetoaddress(g_testing_setup->m_node, ADDRESS_WATCHONLY);
+ generatetoaddress(test_setup.m_node, address_mine.get_value_or(ADDRESS_WATCHONLY));
+ generatetoaddress(test_setup.m_node, ADDRESS_WATCHONLY);
}
SyncWithValidationInterfaceQueue();