mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-08 22:57:56 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user