aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2022-07-15 11:34:21 -0400
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-11-21 10:31:30 +0000
commit7b7bbc145aedf149c6d8675c7e252b0767bb8652 (patch)
tree7ca69b820564cabe611f8bd104f3d734643eb44b /src/qt/walletmodel.h
parenta46e17832fd2ecc44943ff7ccff8af443f6239b8 (diff)
downloadbitcoin-7b7bbc145aedf149c6d8675c7e252b0767bb8652.tar.xz
Disallow encryption of watchonly wallets
Watchonly wallets do not have any private keys to encrypt. It does not make sense to encrypt such wallets, so disable the option to encrypt them. This avoids an assertion that can be hit when encrypting watchonly descriptor wallets. Github-Pull: bitcoin-core/gui#631 Rebased-From: 4c495413e138ec1dd6874e41b44e689f0c15e0e3
Diffstat (limited to 'src/qt/walletmodel.h')
-rw-r--r--src/qt/walletmodel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 47a21bcfcf..a189028b01 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -71,6 +71,7 @@ public:
enum EncryptionStatus
{
+ NoKeys, // wallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)
Unencrypted, // !wallet->IsCrypted()
Locked, // wallet->IsCrypted() && wallet->IsLocked()
Unlocked // wallet->IsCrypted() && !wallet->IsLocked()