Check for unencrypted Sapling keys in CCryptoKeyStore::SetCrypted()

This commit is contained in:
Jack Grigg
2018-08-01 16:05:22 +01:00
parent 0adba6789b
commit 4a89221ffc
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;