mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user