mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
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.
This commit is contained in:
parent
dd391944dc
commit
40c80e36b1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user