mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
wallet/spkm: make GetOldestKeyPoolTime() const
The method checks the oldest key time for key pools and returns the oldest. It does no modifications.
This commit is contained in:
parent
22d329ad0e
commit
227b9dd2d6
4 changed files with 5 additions and 5 deletions
|
@ -441,7 +441,7 @@ static int64_t GetOldestKeyTimeInPool(const std::set<int64_t>& setKeyPool, Walle
|
|||
return keypool.nTime;
|
||||
}
|
||||
|
||||
int64_t LegacyScriptPubKeyMan::GetOldestKeyPoolTime()
|
||||
int64_t LegacyScriptPubKeyMan::GetOldestKeyPoolTime() const
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ public:
|
|||
//! The action to do when the DB needs rewrite
|
||||
virtual void RewriteDB() {}
|
||||
|
||||
virtual int64_t GetOldestKeyPoolTime() { return GetTime(); }
|
||||
virtual int64_t GetOldestKeyPoolTime() const { return GetTime(); }
|
||||
|
||||
virtual size_t KeypoolCountExternalKeys() const { return 0; }
|
||||
virtual unsigned int GetKeyPoolSize() const { return 0; }
|
||||
|
@ -336,7 +336,7 @@ public:
|
|||
|
||||
void RewriteDB() override;
|
||||
|
||||
int64_t GetOldestKeyPoolTime() override;
|
||||
int64_t GetOldestKeyPoolTime() const override;
|
||||
size_t KeypoolCountExternalKeys() const override;
|
||||
unsigned int GetKeyPoolSize() const override;
|
||||
|
||||
|
|
|
@ -3177,7 +3177,7 @@ bool CWallet::GetNewChangeDestination(const OutputType type, CTxDestination& des
|
|||
return true;
|
||||
}
|
||||
|
||||
int64_t CWallet::GetOldestKeyPoolTime()
|
||||
int64_t CWallet::GetOldestKeyPoolTime() const
|
||||
{
|
||||
LOCK(cs_wallet);
|
||||
int64_t oldestKey = std::numeric_limits<int64_t>::max();
|
||||
|
|
|
@ -971,7 +971,7 @@ public:
|
|||
size_t KeypoolCountExternalKeys() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
bool TopUpKeyPool(unsigned int kpSize = 0);
|
||||
|
||||
int64_t GetOldestKeyPoolTime();
|
||||
int64_t GetOldestKeyPoolTime() const;
|
||||
|
||||
std::set<std::set<CTxDestination>> GetAddressGroupings() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
std::map<CTxDestination, CAmount> GetAddressBalances(interfaces::Chain::Lock& locked_chain);
|
||||
|
|
Loading…
Add table
Reference in a new issue