@@ -549,7 +549,7 @@ bool LegacyScriptPubKeyMan::AddKeyPubKeyWithDB(WalletBatch& batch, const CKey& s
549
549
RemoveWatchOnly (script);
550
550
}
551
551
552
- if (!IsCrypted ()) {
552
+ if (!m_storage. HasEncryptionKeys ()) {
553
553
return batch.WriteKey (pubkey,
554
554
secret.GetPrivKey (),
555
555
mapKeyMetadata[pubkey.GetID ()]);
@@ -590,7 +590,7 @@ void LegacyScriptPubKeyMan::LoadScriptMetadata(const CScriptID& script_id, const
590
590
bool LegacyScriptPubKeyMan::AddKeyPubKeyInner (const CKey& key, const CPubKey &pubkey)
591
591
{
592
592
LOCK (cs_KeyStore);
593
- if (!IsCrypted ()) {
593
+ if (!m_storage. HasEncryptionKeys ()) {
594
594
return FillableSigningProvider::AddKeyPubKey (key, pubkey);
595
595
}
596
596
@@ -745,7 +745,7 @@ void LegacyScriptPubKeyMan::SetHDChain(const CHDChain& chain, bool memonly)
745
745
bool LegacyScriptPubKeyMan::HaveKey (const CKeyID &address) const
746
746
{
747
747
LOCK (cs_KeyStore);
748
- if (!IsCrypted ()) {
748
+ if (!m_storage. HasEncryptionKeys ()) {
749
749
return FillableSigningProvider::HaveKey (address);
750
750
}
751
751
return mapCryptedKeys.count (address) > 0 ;
@@ -754,7 +754,7 @@ bool LegacyScriptPubKeyMan::HaveKey(const CKeyID &address) const
754
754
bool LegacyScriptPubKeyMan::GetKey (const CKeyID &address, CKey& keyOut) const
755
755
{
756
756
LOCK (cs_KeyStore);
757
- if (!IsCrypted ()) {
757
+ if (!m_storage. HasEncryptionKeys ()) {
758
758
return FillableSigningProvider::GetKey (address, keyOut);
759
759
}
760
760
@@ -801,7 +801,7 @@ bool LegacyScriptPubKeyMan::GetWatchPubKey(const CKeyID &address, CPubKey &pubke
801
801
bool LegacyScriptPubKeyMan::GetPubKey (const CKeyID &address, CPubKey& vchPubKeyOut) const
802
802
{
803
803
LOCK (cs_KeyStore);
804
- if (!IsCrypted ()) {
804
+ if (!m_storage. HasEncryptionKeys ()) {
805
805
if (!FillableSigningProvider::GetPubKey (address, vchPubKeyOut)) {
806
806
return GetWatchPubKey (address, vchPubKeyOut);
807
807
}
@@ -1387,7 +1387,7 @@ bool LegacyScriptPubKeyMan::ImportScriptPubKeys(const std::set<CScript>& script_
1387
1387
std::set<CKeyID> LegacyScriptPubKeyMan::GetKeys () const
1388
1388
{
1389
1389
LOCK (cs_KeyStore);
1390
- if (!IsCrypted ()) {
1390
+ if (!m_storage. HasEncryptionKeys ()) {
1391
1391
return FillableSigningProvider::GetKeys ();
1392
1392
}
1393
1393
std::set<CKeyID> set_address;
@@ -1403,7 +1403,6 @@ LegacyScriptPubKeyMan::LegacyScriptPubKeyMan(CWallet& wallet)
1403
1403
m_wallet(wallet),
1404
1404
cs_wallet(wallet.cs_wallet) {}
1405
1405
1406
- bool LegacyScriptPubKeyMan::IsCrypted () const { return m_wallet.IsCrypted (); }
1407
1406
void LegacyScriptPubKeyMan::NotifyWatchonlyChanged (bool fHaveWatchOnly ) const { return m_wallet.NotifyWatchonlyChanged (fHaveWatchOnly ); }
1408
1407
void LegacyScriptPubKeyMan::NotifyCanGetAddressesChanged () const { return m_wallet.NotifyCanGetAddressesChanged (); }
1409
1408
template <typename ... Params> void LegacyScriptPubKeyMan::WalletLogPrintf (const std::string& fmt, const Params&... parameters) const { return m_wallet.WalletLogPrintf (fmt, parameters...); }
0 commit comments