Browse Source

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

pull/4/head
Jack Grigg 6 years ago
parent
commit
4a89221ffc
No known key found for this signature in database GPG Key ID: 1B8D649257DB0829
  1. 2
      src/wallet/crypter.cpp
  2. 2
      src/wallet/crypter.h

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

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

Loading…
Cancel
Save