scripted-diff: refactor: wallet: Delete IsCrypted

This function is a duplicate of HasEncryptionKeys().

-BEGIN VERIFY SCRIPT-
sed -i '/bool IsCrypted() const;/d' src/wallet/wallet.h
sed -i '/^bool CWallet::IsCrypted() const$/,/^}$/{/^}$/N;d;}' src/wallet/wallet.cpp
sed -i --regexp-extended 's/IsCrypted\(\)/HasEncryptionKeys()/g' $(git ls-files '*.cpp' '*.h')
-END VERIFY SCRIPT-
This commit is contained in:
David Gumberg
2025-12-24 11:09:15 -08:00
parent d861c38205
commit 11ce5cf799
7 changed files with 15 additions and 21 deletions

View File

@@ -140,7 +140,7 @@ public:
{
return m_wallet->EncryptWallet(wallet_passphrase);
}
bool isCrypted() override { return m_wallet->IsCrypted(); }
bool isCrypted() override { return m_wallet->HasEncryptionKeys(); }
bool lock() override { return m_wallet->Lock(); }
bool unlock(const SecureString& wallet_passphrase) override { return m_wallet->Unlock(wallet_passphrase); }
bool isLocked() override { return m_wallet->IsLocked(); }
@@ -623,7 +623,7 @@ public:
{
auto wallets{GetWallets(m_context)};
auto it = std::find_if(wallets.begin(), wallets.end(), [&](std::shared_ptr<CWallet> w){ return w->GetName() == wallet_name; });
if (it != wallets.end()) return (*it)->IsCrypted();
if (it != wallets.end()) return (*it)->HasEncryptionKeys();
// Unloaded wallet, read db
DatabaseOptions options;