diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-20 21:02:47 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-20 21:04:23 +0200 |
commit | 7f3a6a9495fafbf77f221297615fa56dc3ecc64a (patch) | |
tree | a42860bbdcdbd8fe6a97bf5273caabae0ea1f3e1 /src/wallet | |
parent | 5f44c5c428b696af4214b2519cb2bbeb0e4a1027 (diff) |
wallet: Add external-signer-support specific error message
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 4 | ||||
-rw-r--r-- | src/wallet/walletdb.cpp | 2 | ||||
-rw-r--r-- | src/wallet/walletdb.h | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7e694d1987..11379e1cd2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2692,6 +2692,10 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri error = strprintf(_("Error loading %s: Wallet requires newer version of %s"), walletFile, PACKAGE_NAME); return nullptr; } + else if (nLoadWalletRet == DBErrors::EXTERNAL_SIGNER_SUPPORT_REQUIRED) { + error = strprintf(_("Error loading %s: External signer wallet being loaded without external signer support compiled"), walletFile); + return nullptr; + } else if (nLoadWalletRet == DBErrors::NEED_REWRITE) { error = strprintf(_("Wallet needed to be rewritten: restart %s to complete"), PACKAGE_NAME); diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index c11d4b562d..2d88b07146 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -788,7 +788,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet) #ifndef ENABLE_EXTERNAL_SIGNER if (pwallet->IsWalletFlagSet(WALLET_FLAG_EXTERNAL_SIGNER)) { pwallet->WalletLogPrintf("Error: External signer wallet being loaded without external signer support compiled\n"); - return DBErrors::TOO_NEW; + return DBErrors::EXTERNAL_SIGNER_SUPPORT_REQUIRED; } #endif diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 7d38832aa5..760019e76b 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -48,6 +48,7 @@ enum class DBErrors CORRUPT, NONCRITICAL_ERROR, TOO_NEW, + EXTERNAL_SIGNER_SUPPORT_REQUIRED, LOAD_FAIL, NEED_REWRITE, NEED_RESCAN |