diff options
| author | Andrew Chow <[email protected]> | 2019-12-05 18:14:53 -0500 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2019-12-06 15:05:48 -0500 |
| commit | bf6417142f36a2f75b3a11368bd73fe788ae1ccb (patch) | |
| tree | 1c2b79eea3f32fdedfe3eb0ff0d12c42cda8eb5b /src/wallet/wallet.cpp | |
| parent | Rename EncryptKeys to Encrypt and pass in the encrypted batch to use (diff) | |
| download | discoin-bf6417142f36a2f75b3a11368bd73fe788ae1ccb.tar.xz discoin-bf6417142f36a2f75b3a11368bd73fe788ae1ccb.zip | |
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()
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 88399bbab..41a816312 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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; { |