Skip to content

Commit 7f3a6a9

Browse files
committed
wallet: Add external-signer-support specific error message
1 parent 5f44c5c commit 7f3a6a9

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,6 +2692,10 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
26922692
error = strprintf(_("Error loading %s: Wallet requires newer version of %s"), walletFile, PACKAGE_NAME);
26932693
return nullptr;
26942694
}
2695+
else if (nLoadWalletRet == DBErrors::EXTERNAL_SIGNER_SUPPORT_REQUIRED) {
2696+
error = strprintf(_("Error loading %s: External signer wallet being loaded without external signer support compiled"), walletFile);
2697+
return nullptr;
2698+
}
26952699
else if (nLoadWalletRet == DBErrors::NEED_REWRITE)
26962700
{
26972701
error = strprintf(_("Wallet needed to be rewritten: restart %s to complete"), PACKAGE_NAME);

src/wallet/walletdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
788788
#ifndef ENABLE_EXTERNAL_SIGNER
789789
if (pwallet->IsWalletFlagSet(WALLET_FLAG_EXTERNAL_SIGNER)) {
790790
pwallet->WalletLogPrintf("Error: External signer wallet being loaded without external signer support compiled\n");
791-
return DBErrors::TOO_NEW;
791+
return DBErrors::EXTERNAL_SIGNER_SUPPORT_REQUIRED;
792792
}
793793
#endif
794794

src/wallet/walletdb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ enum class DBErrors
4848
CORRUPT,
4949
NONCRITICAL_ERROR,
5050
TOO_NEW,
51+
EXTERNAL_SIGNER_SUPPORT_REQUIRED,
5152
LOAD_FAIL,
5253
NEED_REWRITE,
5354
NEED_RESCAN

0 commit comments

Comments
 (0)