mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Remove SetCrypted() and fUseCrypto; Change IsCrypted()'s implementation
Removes SetCrypted() and fUseCrypto as we don't need them anymore. SetCrypted calls in LegacyScriptPubKeyMan are replaced with mapKeys.empty() IsCrypted() is changed to just call HasEncryptionKeys()
This commit is contained in:
@@ -4002,15 +4002,9 @@ std::vector<OutputGroup> CWallet::GroupOutputs(const std::vector<COutput>& outpu
|
||||
return groups;
|
||||
}
|
||||
|
||||
bool CWallet::SetCrypted()
|
||||
bool CWallet::IsCrypted() const
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
if (fUseCrypto)
|
||||
return true;
|
||||
if (!mapKeys.empty())
|
||||
return false;
|
||||
fUseCrypto = true;
|
||||
return true;
|
||||
return HasEncryptionKeys();
|
||||
}
|
||||
|
||||
bool CWallet::IsLocked() const
|
||||
@@ -4024,7 +4018,7 @@ bool CWallet::IsLocked() const
|
||||
|
||||
bool CWallet::Lock()
|
||||
{
|
||||
if (!SetCrypted())
|
||||
if (!IsCrypted())
|
||||
return false;
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user