Add GetEncryptionKey() and HasEncryptionKeys() to WalletStorage

Adds functions in WalletStorage that allow ScriptPubKeyMans to check
and get encryption keys from the wallet.
This commit is contained in:
Andrew Chow
2019-12-05 18:01:30 -05:00
parent 4ee8a58ce7
commit fd9d6eebc1
3 changed files with 15 additions and 0 deletions

View File

@@ -4056,3 +4056,13 @@ LegacyScriptPubKeyMan* CWallet::GetLegacyScriptPubKeyMan() const
{
return m_spk_man.get();
}
const CKeyingMaterial& CWallet::GetEncryptionKey() const
{
return vMasterKey;
}
bool CWallet::HasEncryptionKeys() const
{
return !mapMasterKeys.empty();
}