diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp index a8c0e0706..ede017c8d 100644 --- a/src/wallet/crypter.cpp +++ b/src/wallet/crypter.cpp @@ -232,6 +232,21 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) if (fDecryptionThoroughlyChecked) break; } + CryptedSaplingSpendingKeyMap::const_iterator miSapling = mapCryptedSaplingSpendingKeys.begin(); + for (; miSapling != mapCryptedSaplingSpendingKeys.end(); ++miSapling) + { + const libzcash::SaplingFullViewingKey &fvk = (*miSapling).first; + const std::vector &vchCryptedSecret = (*miSapling).second; + libzcash::SaplingSpendingKey sk; + if (!DecryptSaplingSpendingKey(vMasterKeyIn, vchCryptedSecret, fvk, sk)) + { + keyFail = true; + break; + } + keyPass = true; + if (fDecryptionThoroughlyChecked) + break; + } if (keyPass && keyFail) { LogPrintf("The wallet is probably corrupted: Some keys decrypt but not all.\n");