From 4a89221ffc2f2bf6ed8cf77a07c9b610c9f4e9a4 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 1 Aug 2018 16:05:22 +0100 Subject: [PATCH] Check for unencrypted Sapling keys in CCryptoKeyStore::SetCrypted() --- src/wallet/crypter.cpp | 2 +- src/wallet/crypter.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp index ede017c8d..272d3a5e4 100644 --- a/src/wallet/crypter.cpp +++ b/src/wallet/crypter.cpp @@ -173,7 +173,7 @@ bool CCryptoKeyStore::SetCrypted() LOCK2(cs_KeyStore, cs_SpendingKeyStore); if (fUseCrypto) return true; - if (!(mapKeys.empty() && mapSpendingKeys.empty())) + if (!(mapKeys.empty() && mapSpendingKeys.empty() && mapSaplingSpendingKeys.empty())) return false; fUseCrypto = true; return true; diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h index 2c3c45071..817d8de40 100644 --- a/src/wallet/crypter.h +++ b/src/wallet/crypter.h @@ -133,7 +133,7 @@ private: CKeyingMaterial vMasterKey; - //! if fUseCrypto is true, mapKeys and mapSpendingKeys must be empty + //! if fUseCrypto is true, mapKeys, mapSpendingKeys, and mapSaplingSpendingKeys must be empty //! if fUseCrypto is false, vMasterKey must be empty bool fUseCrypto;