Add Sapling have/get sk crypter overrides

This commit is contained in:
Jay Graber
2018-07-12 14:57:53 -07:00
committed by Jack Grigg
parent 871e1726c6
commit 55f2889396
4 changed files with 64 additions and 4 deletions

View File

@@ -236,6 +236,18 @@ public:
virtual bool AddCryptedSaplingSpendingKey(const libzcash::SaplingFullViewingKey &fvk,
const std::vector<unsigned char> &vchCryptedSecret);
bool AddSaplingSpendingKey(const libzcash::SaplingSpendingKey &sk);
bool HaveSaplingSpendingKey(const libzcash::SaplingFullViewingKey &fvk) const
{
{
LOCK(cs_SpendingKeyStore);
if (!IsCrypted())
return CBasicKeyStore::HaveSaplingSpendingKey(fvk);
return mapCryptedSaplingSpendingKeys.count(fvk) > 0;
}
return false;
}
bool GetSaplingSpendingKey(const libzcash::SaplingFullViewingKey &fvk, libzcash::SaplingSpendingKey &skOut) const;
/**
* Wallet status (encrypted, locked) changed.