diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-10-30 22:19:22 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-11-03 10:35:47 +0200 |
commit | 3e4f069d23cd2ea5de8fa3c4b1a761ab097ad56f (patch) | |
tree | adb1abecbd5e4f80994e48d8f44e10f767d0e8c7 /src/wallet/scriptpubkeyman.h | |
parent | 7efc628539573af4b4a76d93b853cc46e9e52eae (diff) |
wallet, refactor: Make GetOldestKeyPoolTime return type std::optional
This change gets rid of the magic number 0 in the
DescriptorScriptPubKeyMan::GetOldestKeyPoolTime() function.
No behavior change.
Diffstat (limited to 'src/wallet/scriptpubkeyman.h')
-rw-r--r-- | src/wallet/scriptpubkeyman.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index ef74638751..2d447f1d67 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -19,6 +19,7 @@ #include <boost/signals2/signal.hpp> +#include <optional> #include <unordered_map> enum class OutputType; @@ -203,7 +204,7 @@ public: //! The action to do when the DB needs rewrite virtual void RewriteDB() {} - virtual int64_t GetOldestKeyPoolTime() const { return GetTime(); } + virtual std::optional<int64_t> GetOldestKeyPoolTime() const { return GetTime(); } virtual unsigned int GetKeyPoolSize() const { return 0; } @@ -371,7 +372,7 @@ public: void RewriteDB() override; - int64_t GetOldestKeyPoolTime() const override; + std::optional<int64_t> GetOldestKeyPoolTime() const override; size_t KeypoolCountExternalKeys() const; unsigned int GetKeyPoolSize() const override; @@ -577,7 +578,7 @@ public: bool HavePrivateKeys() const override; - int64_t GetOldestKeyPoolTime() const override; + std::optional<int64_t> GetOldestKeyPoolTime() const override; unsigned int GetKeyPoolSize() const override; int64_t GetTimeFirstKey() const override; |