aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-03-15 11:59:05 +0800
committerfanquake <fanquake@gmail.com>2021-03-17 14:56:20 +0800
commitebc4ab721b0371c0ef217c0f5bd7d42613e951e6 (patch)
treec4f91deb60589d4d6e5c347d99ca7c611a01ee79 /src/wallet/wallet.cpp
parent57e980d13ca488031bde6ef197cf34d493d36796 (diff)
downloadbitcoin-ebc4ab721b0371c0ef217c0f5bd7d42613e951e6.tar.xz
refactor: post Optional<> removal cleanups
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index ad1d04d084..2b36da2e0e 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -13,7 +13,6 @@
#include <interfaces/wallet.h>
#include <key.h>
#include <key_io.h>
-#include <optional>
#include <outputtype.h>
#include <policy/fees.h>
#include <policy/policy.h>
@@ -40,6 +39,7 @@
#include <algorithm>
#include <assert.h>
+#include <optional>
#include <boost/algorithm/string/replace.hpp>
@@ -87,7 +87,7 @@ static void UpdateWalletSetting(interfaces::Chain& chain,
std::optional<bool> load_on_startup,
std::vector<bilingual_str>& warnings)
{
- if (load_on_startup == std::nullopt) return;
+ if (!load_on_startup) return;
if (load_on_startup.value() && !AddWalletSetting(chain, wallet_name)) {
warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may not be loaded next node startup."));
} else if (!load_on_startup.value() && !RemoveWalletSetting(chain, wallet_name)) {