mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-14 22:00:44 +02:00
wallet: make KeypoolCountExternalKeys() const
This method returns the sum of the key pool sizes. It does no modification.
This commit is contained in:
parent
ddc93557ad
commit
037fa770eb
@ -459,7 +459,7 @@ int64_t LegacyScriptPubKeyMan::GetOldestKeyPoolTime()
|
|||||||
return oldestKey;
|
return oldestKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t LegacyScriptPubKeyMan::KeypoolCountExternalKeys()
|
size_t LegacyScriptPubKeyMan::KeypoolCountExternalKeys() const
|
||||||
{
|
{
|
||||||
LOCK(cs_KeyStore);
|
LOCK(cs_KeyStore);
|
||||||
return setExternalKeyPool.size() + set_pre_split_keypool.size();
|
return setExternalKeyPool.size() + set_pre_split_keypool.size();
|
||||||
|
@ -196,7 +196,7 @@ public:
|
|||||||
|
|
||||||
virtual int64_t GetOldestKeyPoolTime() { return GetTime(); }
|
virtual int64_t GetOldestKeyPoolTime() { return GetTime(); }
|
||||||
|
|
||||||
virtual size_t KeypoolCountExternalKeys() { return 0; }
|
virtual size_t KeypoolCountExternalKeys() const { return 0; }
|
||||||
virtual unsigned int GetKeyPoolSize() const { return 0; }
|
virtual unsigned int GetKeyPoolSize() const { return 0; }
|
||||||
|
|
||||||
virtual int64_t GetTimeFirstKey() const { return 0; }
|
virtual int64_t GetTimeFirstKey() const { return 0; }
|
||||||
@ -337,7 +337,7 @@ public:
|
|||||||
void RewriteDB() override;
|
void RewriteDB() override;
|
||||||
|
|
||||||
int64_t GetOldestKeyPoolTime() override;
|
int64_t GetOldestKeyPoolTime() override;
|
||||||
size_t KeypoolCountExternalKeys() override;
|
size_t KeypoolCountExternalKeys() const override;
|
||||||
unsigned int GetKeyPoolSize() const override;
|
unsigned int GetKeyPoolSize() const override;
|
||||||
|
|
||||||
int64_t GetTimeFirstKey() const override;
|
int64_t GetTimeFirstKey() const override;
|
||||||
|
@ -3112,7 +3112,7 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
|
|||||||
return WalletBatch(*database).EraseName(EncodeDestination(address));
|
return WalletBatch(*database).EraseName(EncodeDestination(address));
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CWallet::KeypoolCountExternalKeys()
|
size_t CWallet::KeypoolCountExternalKeys() const
|
||||||
{
|
{
|
||||||
AssertLockHeld(cs_wallet);
|
AssertLockHeld(cs_wallet);
|
||||||
|
|
||||||
|
@ -968,7 +968,7 @@ public:
|
|||||||
/** Absolute maximum transaction fee (in satoshis) used by default for the wallet */
|
/** Absolute maximum transaction fee (in satoshis) used by default for the wallet */
|
||||||
CAmount m_default_max_tx_fee{DEFAULT_TRANSACTION_MAXFEE};
|
CAmount m_default_max_tx_fee{DEFAULT_TRANSACTION_MAXFEE};
|
||||||
|
|
||||||
size_t KeypoolCountExternalKeys() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
size_t KeypoolCountExternalKeys() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||||
bool TopUpKeyPool(unsigned int kpSize = 0);
|
bool TopUpKeyPool(unsigned int kpSize = 0);
|
||||||
|
|
||||||
int64_t GetOldestKeyPoolTime();
|
int64_t GetOldestKeyPoolTime();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user