Store ExtFVK with encrypted Sapling spending key instead of FVK

This ensures that even when the wallet is encrypted, we can derive the default
Sapling payment address for our spending keys.
This commit is contained in:
Jack Grigg
2018-10-05 23:13:32 +01:00
parent 87ae893d75
commit 1b79de781c
6 changed files with 44 additions and 25 deletions

View File

@@ -293,11 +293,11 @@ bool CWallet::AddCryptedSproutSpendingKey(
return false;
}
bool CWallet::AddCryptedSaplingSpendingKey(const libzcash::SaplingFullViewingKey &fvk,
bool CWallet::AddCryptedSaplingSpendingKey(const libzcash::SaplingExtendedFullViewingKey &extfvk,
const std::vector<unsigned char> &vchCryptedSecret,
const libzcash::SaplingPaymentAddress &defaultAddr)
{
if (!CCryptoKeyStore::AddCryptedSaplingSpendingKey(fvk, vchCryptedSecret, defaultAddr))
if (!CCryptoKeyStore::AddCryptedSaplingSpendingKey(extfvk, vchCryptedSecret, defaultAddr))
return false;
if (!fFileBacked)
return true;