diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-02-23 17:19:19 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-02-23 17:19:49 -0500 |
commit | 8d6f9210d90b350a9248f853ed8c559ef5e12505 (patch) | |
tree | 9c5c5cced95cb0e7b75bc69f2cb4a5b819b8c041 /src/wallet/wallet.cpp | |
parent | 0a76bf848c72211f986a6cc5b1c13de820b861dd (diff) | |
parent | 7f3a6a9495fafbf77f221297615fa56dc3ecc64a (diff) |
Merge bitcoin/bitcoin#24401: wallet: Add external-signer-support specific error message
7f3a6a9495fafbf77f221297615fa56dc3ecc64a wallet: Add external-signer-support specific error message (Hennadii Stepanov)
Pull request description:
On master (5f44c5c428b696af4214b2519cb2bbeb0e4a1027) an attempt to load an external signer wallet using Bitcoin Core compiled without external signer support fails with the following log messages:
```
2022-02-20T19:01:11Z [qt-walletctrl] Using SQLite Version 3.31.1
2022-02-20T19:01:11Z [qt-walletctrl] Using wallet /home/hebasto/.bitcoin/testnet3/wallets/coldcard-0220
2022-02-20T19:01:11Z [qt-walletctrl] init message: Loading wallet…
2022-02-20T19:01:11Z [qt-walletctrl] [coldcard-0220] Error: External signer wallet being loaded without external signer support compiled
2022-02-20T19:01:11Z [qt-walletctrl] [coldcard-0220] Releasing wallet
```
While log messages are good, a message in the GUI window is completely misleading:
![Screenshot from 2022-02-20 20-43-46](https://user-images.githubusercontent.com/32963518/154859854-b87032e0-c428-4e11-8009-39e38200482c.png)
This PR fixes this issue:
![Screenshot from 2022-02-20 21-01-18](https://user-images.githubusercontent.com/32963518/154859868-e3a2c89d-4f0f-424e-96cb-7accaa48acc0.png)
ACKs for top commit:
achow101:
ACK 7f3a6a9495fafbf77f221297615fa56dc3ecc64a
kristapsk:
ACK 7f3a6a9495fafbf77f221297615fa56dc3ecc64a
brunoerg:
crACK 7f3a6a9495fafbf77f221297615fa56dc3ecc64a
Tree-SHA512: a4842751c0ca8a37ccc3ea00503678f6b712a7f53d6cbdc07ce02dcb85ca8a94890d1c2da20307be043faa347747abeba29185c88ba12edd5253bfca56531585
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 6549a2146b..6cf9f9ce74 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2693,6 +2693,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); |