aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2021-03-17 10:52:16 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2021-03-17 12:17:33 +0100
commita9d1b40d53ec417eefbe767aa66701ef8e1801d5 (patch)
treee7a827d8f9143a83227ccb90085214b4449bbfd5 /src/bench
parent993ecafa5eb7f87574e2befc0e2057d4662a7f56 (diff)
parentebc4ab721b0371c0ef217c0f5bd7d42613e951e6 (diff)
downloadbitcoin-a9d1b40d53ec417eefbe767aa66701ef8e1801d5.tar.xz
Merge #21415: refactor: remove Optional & nullopt
ebc4ab721b0371c0ef217c0f5bd7d42613e951e6 refactor: post Optional<> removal cleanups (fanquake) 57e980d13ca488031bde6ef197cf34d493d36796 scripted-diff: remove Optional & nullopt (fanquake) Pull request description: Same rationale & motivation as #21404, which turned out to be quite low in the number of potential conflicts. Lets see what the bot has to say here. ACKs for top commit: practicalswift: cr ACK ebc4ab721b0371c0ef217c0f5bd7d42613e951e6: patch looks correct jnewbery: utACK ebc4ab721b0371c0ef217c0f5bd7d42613e951e6 laanwj: Code review ACK ebc4ab721b0371c0ef217c0f5bd7d42613e951e6 Tree-SHA512: 550fbeef09b9d35ddefaa805d1755c18c8fd499c4b0f77ebfece8c20296a7abd1cf6c699e2261f92fe3552deeb7555ec2a2287ffe3ab9e98bb9f8612a4d43be3
Diffstat (limited to 'src/bench')
-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 c96ef209e3..d7cc167885 100644
--- a/src/bench/wallet_balance.cpp
+++ b/src/bench/wallet_balance.cpp
@@ -5,13 +5,14 @@
#include <bench/bench.h>
#include <interfaces/chain.h>
#include <node/context.h>
-#include <optional.h>
#include <test/util/mining.h>
#include <test/util/setup_common.h>
#include <test/util/wallet.h>
#include <validationinterface.h>
#include <wallet/wallet.h>
+#include <optional>
+
static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const bool add_watchonly, const bool add_mine)
{
const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
@@ -26,7 +27,7 @@ static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const b
}
auto handler = test_setup->m_node.chain->handleNotifications({&wallet, [](CWallet*) {}});
- const Optional<std::string> address_mine{add_mine ? Optional<std::string>{getnewaddress(wallet)} : nullopt};
+ const std::optional<std::string> address_mine{add_mine ? std::optional<std::string>{getnewaddress(wallet)} : std::nullopt};
if (add_watchonly) importaddress(wallet, ADDRESS_WATCHONLY);
for (int i = 0; i < 100; ++i) {