diff --git a/src/keystore.h b/src/keystore.h index c856005c1..e44001570 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -274,7 +274,7 @@ public: typedef std::vector > CKeyingMaterial; typedef std::map > > CryptedKeyMap; -typedef std::map > CryptedSpendingKeyMap; +typedef std::map > CryptedSproutSpendingKeyMap; //! Sapling typedef std::map > CryptedSaplingSpendingKeyMap; diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp index 2bcfabae8..a8c0e0706 100644 --- a/src/wallet/crypter.cpp +++ b/src/wallet/crypter.cpp @@ -217,11 +217,11 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) if (fDecryptionThoroughlyChecked) break; } - CryptedSpendingKeyMap::const_iterator skmi = mapCryptedSpendingKeys.begin(); - for (; skmi != mapCryptedSpendingKeys.end(); ++skmi) + CryptedSproutSpendingKeyMap::const_iterator miSprout = mapCryptedSproutSpendingKeys.begin(); + for (; miSprout != mapCryptedSproutSpendingKeys.end(); ++miSprout) { - const libzcash::SproutPaymentAddress &address = (*skmi).first; - const std::vector &vchCryptedSecret = (*skmi).second; + const libzcash::SproutPaymentAddress &address = (*miSprout).first; + const std::vector &vchCryptedSecret = (*miSprout).second; libzcash::SproutSpendingKey sk; if (!DecryptSproutSpendingKey(vMasterKeyIn, vchCryptedSecret, address, sk)) { @@ -376,7 +376,7 @@ bool CCryptoKeyStore::AddCryptedSpendingKey(const libzcash::SproutPaymentAddress if (!SetCrypted()) return false; - mapCryptedSpendingKeys[address] = vchCryptedSecret; + mapCryptedSproutSpendingKeys[address] = vchCryptedSecret; mapNoteDecryptors.insert(std::make_pair(address, ZCNoteDecryption(rk))); } return true; @@ -404,8 +404,8 @@ bool CCryptoKeyStore::GetSpendingKey(const libzcash::SproutPaymentAddress &addre if (!IsCrypted()) return CBasicKeyStore::GetSpendingKey(address, skOut); - CryptedSpendingKeyMap::const_iterator mi = mapCryptedSpendingKeys.find(address); - if (mi != mapCryptedSpendingKeys.end()) + CryptedSproutSpendingKeyMap::const_iterator mi = mapCryptedSproutSpendingKeys.find(address); + if (mi != mapCryptedSproutSpendingKeys.end()) { const std::vector &vchCryptedSecret = (*mi).second; return DecryptSproutSpendingKey(vMasterKey, vchCryptedSecret, address, skOut); diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h index d42a8f556..2c3c45071 100644 --- a/src/wallet/crypter.h +++ b/src/wallet/crypter.h @@ -128,10 +128,9 @@ class CCryptoKeyStore : public CBasicKeyStore { private: CryptedKeyMap mapCryptedKeys; - CryptedSpendingKeyMap mapCryptedSpendingKeys; - + CryptedSproutSpendingKeyMap mapCryptedSproutSpendingKeys; CryptedSaplingSpendingKeyMap mapCryptedSaplingSpendingKeys; - + CKeyingMaterial vMasterKey; //! if fUseCrypto is true, mapKeys and mapSpendingKeys must be empty @@ -212,7 +211,7 @@ public: LOCK(cs_SpendingKeyStore); if (!IsCrypted()) return CBasicKeyStore::HaveSpendingKey(address); - return mapCryptedSpendingKeys.count(address) > 0; + return mapCryptedSproutSpendingKeys.count(address) > 0; } return false; } @@ -225,8 +224,8 @@ public: return; } setAddress.clear(); - CryptedSpendingKeyMap::const_iterator mi = mapCryptedSpendingKeys.begin(); - while (mi != mapCryptedSpendingKeys.end()) + CryptedSproutSpendingKeyMap::const_iterator mi = mapCryptedSproutSpendingKeys.begin(); + while (mi != mapCryptedSproutSpendingKeys.end()) { setAddress.insert((*mi).first); mi++;