@@ -594,7 +594,7 @@ bool LegacyScriptPubKeyMan::AddKeyPubKeyInner(const CKey& key, const CPubKey &pu
594594
595595 std::vector<unsigned char > vchCryptedSecret;
596596 CKeyingMaterial vchSecret (key.begin (), key.end ());
597- if (!EncryptSecret (vMasterKey , vchSecret, pubkey.GetHash (), vchCryptedSecret)) {
597+ if (!EncryptSecret (m_storage. GetEncryptionKey () , vchSecret, pubkey.GetHash (), vchCryptedSecret)) {
598598 return false ;
599599 }
600600
@@ -759,7 +759,7 @@ bool LegacyScriptPubKeyMan::GetKey(const CKeyID &address, CKey& keyOut) const
759759 {
760760 const CPubKey &vchPubKey = (*mi).second .first ;
761761 const std::vector<unsigned char > &vchCryptedSecret = (*mi).second .second ;
762- return DecryptKey (vMasterKey , vchCryptedSecret, vchPubKey, keyOut);
762+ return DecryptKey (m_storage. GetEncryptionKey () , vchCryptedSecret, vchPubKey, keyOut);
763763 }
764764 return false ;
765765}
@@ -1398,7 +1398,6 @@ LegacyScriptPubKeyMan::LegacyScriptPubKeyMan(CWallet& wallet)
13981398 : ScriptPubKeyMan(wallet),
13991399 m_wallet(wallet),
14001400 cs_wallet(wallet.cs_wallet),
1401- vMasterKey(wallet.vMasterKey),
14021401 fUseCrypto(wallet.fUseCrypto ),
14031402 fDecryptionThoroughlyChecked(wallet.fDecryptionThoroughlyChecked ) {}
14041403
0 commit comments