Refactor: Move HavePrivateKeys code out of CWallet::CreateWalletFromFile

This commit does not change behavior.
This commit is contained in:
Andrew Chow
2019-10-07 14:11:34 -04:00
parent 8b0d82bb42
commit f45d12b36c
3 changed files with 14 additions and 3 deletions

View File

@@ -168,6 +168,8 @@ public:
/** Upgrades the wallet to the specified version */
virtual bool Upgrade(int prev_version, std::string& error) { return false; }
virtual bool HavePrivateKeys() const { return false; }
virtual int64_t GetOldestKeyPoolTime() { return GetTime(); }
virtual size_t KeypoolCountExternalKeys() { return 0; }
@@ -276,6 +278,8 @@ public:
bool Upgrade(int prev_version, std::string& error) override;
bool HavePrivateKeys() const override;
int64_t GetOldestKeyPoolTime() override;
size_t KeypoolCountExternalKeys() override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);