mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 11:00:44 +01:00
Replace LegacyScriptPubKeyMan::vMasterKey with GetDecryptionKey()
This commit is contained in:
@@ -594,7 +594,7 @@ bool LegacyScriptPubKeyMan::AddKeyPubKeyInner(const CKey& key, const CPubKey &pu
|
||||
|
||||
std::vector<unsigned char> vchCryptedSecret;
|
||||
CKeyingMaterial vchSecret(key.begin(), key.end());
|
||||
if (!EncryptSecret(vMasterKey, vchSecret, pubkey.GetHash(), vchCryptedSecret)) {
|
||||
if (!EncryptSecret(m_storage.GetEncryptionKey(), vchSecret, pubkey.GetHash(), vchCryptedSecret)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ bool LegacyScriptPubKeyMan::GetKey(const CKeyID &address, CKey& keyOut) const
|
||||
{
|
||||
const CPubKey &vchPubKey = (*mi).second.first;
|
||||
const std::vector<unsigned char> &vchCryptedSecret = (*mi).second.second;
|
||||
return DecryptKey(vMasterKey, vchCryptedSecret, vchPubKey, keyOut);
|
||||
return DecryptKey(m_storage.GetEncryptionKey(), vchCryptedSecret, vchPubKey, keyOut);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1398,7 +1398,6 @@ LegacyScriptPubKeyMan::LegacyScriptPubKeyMan(CWallet& wallet)
|
||||
: ScriptPubKeyMan(wallet),
|
||||
m_wallet(wallet),
|
||||
cs_wallet(wallet.cs_wallet),
|
||||
vMasterKey(wallet.vMasterKey),
|
||||
fUseCrypto(wallet.fUseCrypto),
|
||||
fDecryptionThoroughlyChecked(wallet.fDecryptionThoroughlyChecked) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user