aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallettool.cpp
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2023-12-19 16:52:35 -0500
committerAva Chow <github@achow101.com>2023-12-19 16:54:06 -0500
commit40c80e36b1a204ed133acc403016a6cb1a92051e (patch)
treeb9956de1aaa7140b8ed6db0d7efcb8a86cde70f2 /src/wallet/wallettool.cpp
parentdd391944dc2d4e7dda9439647e603b41ba751b78 (diff)
downloadbitcoin-40c80e36b1a204ed133acc403016a6cb1a92051e.tar.xz
wallettool: Don't unilaterally reset wallet_instance if loading error
When there is a wallet loading error, it could be a noncritical one so it is not necessary to make wallet_instance a nullptr. The wallet can still go on with normal operation in that case, as we do for loading in bitcoind and bitcoin-qt.
Diffstat (limited to 'src/wallet/wallettool.cpp')
-rw-r--r--src/wallet/wallettool.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp
index 2f3f8ef77d..c8deda89b5 100644
--- a/src/wallet/wallettool.cpp
+++ b/src/wallet/wallettool.cpp
@@ -68,7 +68,6 @@ static std::shared_ptr<CWallet> MakeWallet(const std::string& name, const fs::pa
}
if (load_wallet_ret != DBErrors::LOAD_OK) {
- wallet_instance = nullptr;
if (load_wallet_ret == DBErrors::CORRUPT) {
tfm::format(std::cerr, "Error loading %s: Wallet corrupted", name);
return nullptr;