diff options
| author | Andrew Chow <[email protected]> | 2019-10-07 14:11:34 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2019-11-01 22:58:05 -0400 |
| commit | f45d12b36cee05aa3c2685b951d27bd8a58539ae (patch) | |
| tree | 9bfd31cb0352ea8d41a115ed4bcc8a894a5b530e /src/wallet/scriptpubkeyman.cpp | |
| parent | Refactor: Move Upgrade code out of CWallet::CreateWalletFromFile (diff) | |
| download | discoin-f45d12b36cee05aa3c2685b951d27bd8a58539ae.tar.xz discoin-f45d12b36cee05aa3c2685b951d27bd8a58539ae.zip | |
Refactor: Move HavePrivateKeys code out of CWallet::CreateWalletFromFile
This commit does not change behavior.
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
| -rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 9300630f6..9d90edeea 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -396,6 +396,12 @@ bool LegacyScriptPubKeyMan::Upgrade(int prev_version, std::string& error) return true; } +bool LegacyScriptPubKeyMan::HavePrivateKeys() const +{ + LOCK(cs_KeyStore); + return !mapKeys.empty() || !mapCryptedKeys.empty(); +} + static int64_t GetOldestKeyTimeInPool(const std::set<int64_t>& setKeyPool, WalletBatch& batch) { if (setKeyPool.empty()) { return GetTime(); |