aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-12-05 18:14:53 -0500
committerAndrew Chow <achow101-github@achow101.com>2019-12-06 15:05:48 -0500
commitbf6417142f36a2f75b3a11368bd73fe788ae1ccb (patch)
tree1c2b79eea3f32fdedfe3eb0ff0d12c42cda8eb5b /src/wallet/wallet.h
parent77a777118eaf78f10a439810d1c08d510a539aa0 (diff)
downloadbitcoin-bf6417142f36a2f75b3a11368bd73fe788ae1ccb.tar.xz
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.h')
-rw-r--r--src/wallet/wallet.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index eb74baee4e..c4511601de 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -597,12 +597,7 @@ class CWallet final : public WalletStorage, private interfaces::Chain::Notificat
private:
CKeyingMaterial vMasterKey GUARDED_BY(cs_KeyStore);
- //! if fUseCrypto is true, mapKeys must be empty
- //! if fUseCrypto is false, vMasterKey must be empty
- std::atomic<bool> fUseCrypto;
-
- bool SetCrypted();
bool Unlock(const CKeyingMaterial& vMasterKeyIn, bool accept_no_keys = false);
std::atomic<bool> fAbortRescan{false};
@@ -732,8 +727,7 @@ public:
/** Construct wallet with specified name and database implementation. */
CWallet(interfaces::Chain* chain, const WalletLocation& location, std::unique_ptr<WalletDatabase> database)
- : fUseCrypto(false),
- m_chain(chain),
+ : m_chain(chain),
m_location(location),
database(std::move(database))
{
@@ -745,7 +739,7 @@ public:
assert(NotifyUnload.empty());
}
- bool IsCrypted() const { return fUseCrypto; }
+ bool IsCrypted() const;
bool IsLocked() const override;
bool Lock();