Skip to content

Commit 40c80e3

Browse files
committed
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.
1 parent dd39194 commit 40c80e3

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/wallet/wallettool.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ static std::shared_ptr<CWallet> MakeWallet(const std::string& name, const fs::pa
6868
}
6969

7070
if (load_wallet_ret != DBErrors::LOAD_OK) {
71-
wallet_instance = nullptr;
7271
if (load_wallet_ret == DBErrors::CORRUPT) {
7372
tfm::format(std::cerr, "Error loading %s: Wallet corrupted", name);
7473
return nullptr;

0 commit comments

Comments
 (0)