@@ -594,7 +594,7 @@ bool LegacyScriptPubKeyMan::AddKeyPubKeyInner(const CKey& key, const CPubKey &pu
594
594
595
595
std::vector<unsigned char > vchCryptedSecret;
596
596
CKeyingMaterial vchSecret (key.begin (), key.end ());
597
- if (!EncryptSecret (vMasterKey , vchSecret, pubkey.GetHash (), vchCryptedSecret)) {
597
+ if (!EncryptSecret (m_storage. GetEncryptionKey () , vchSecret, pubkey.GetHash (), vchCryptedSecret)) {
598
598
return false ;
599
599
}
600
600
@@ -759,7 +759,7 @@ bool LegacyScriptPubKeyMan::GetKey(const CKeyID &address, CKey& keyOut) const
759
759
{
760
760
const CPubKey &vchPubKey = (*mi).second .first ;
761
761
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);
763
763
}
764
764
return false ;
765
765
}
@@ -1398,7 +1398,6 @@ LegacyScriptPubKeyMan::LegacyScriptPubKeyMan(CWallet& wallet)
1398
1398
: ScriptPubKeyMan(wallet),
1399
1399
m_wallet(wallet),
1400
1400
cs_wallet(wallet.cs_wallet),
1401
- vMasterKey(wallet.vMasterKey),
1402
1401
fUseCrypto(wallet.fUseCrypto ),
1403
1402
fDecryptionThoroughlyChecked(wallet.fDecryptionThoroughlyChecked ) {}
1404
1403
0 commit comments