mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02: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:
parent
77a777118e
commit
bf6417142f
4 changed files with 9 additions and 29 deletions
|
|
@ -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;
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue