diff options
author | Andrew Chow <achow101-github@achow101.com> | 2019-10-07 14:11:34 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2019-11-01 22:58:05 -0400 |
commit | 8b0d82bb428de9e7f1da7c61574e7a8376a62d43 (patch) | |
tree | fe38b0f749cbb7b639c4b159716b1dd13c79b9ec /src/wallet/scriptpubkeyman.h | |
parent | 46865ec958b6b9bde04a827de598975f14bdb5e7 (diff) |
Refactor: Move Upgrade code out of CWallet::CreateWalletFromFile
This commit does not change behavior.
Diffstat (limited to 'src/wallet/scriptpubkeyman.h')
-rw-r--r-- | src/wallet/scriptpubkeyman.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index be55d3cb12..e2a706e9af 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -165,6 +165,9 @@ public: /* Returns true if the wallet can give out new addresses. This means it has keys in the keypool or can generate new keys */ virtual bool CanGetAddresses(bool internal = false) { return false; } + /** Upgrades the wallet to the specified version */ + virtual bool Upgrade(int prev_version, std::string& error) { return false; } + virtual int64_t GetOldestKeyPoolTime() { return GetTime(); } virtual size_t KeypoolCountExternalKeys() { return 0; } @@ -271,6 +274,8 @@ public: bool IsHDEnabled() const override; + bool Upgrade(int prev_version, std::string& error) override; + int64_t GetOldestKeyPoolTime() override; size_t KeypoolCountExternalKeys() override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); |