mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
CWallet::TopUpKeyPool() takes optional pool size argument
Also, GetKeyPoolSize() now returns an accurate type, unsigned int.
This commit is contained in:
@@ -1553,7 +1553,7 @@ bool CWallet::NewKeyPool()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CWallet::TopUpKeyPool()
|
||||
bool CWallet::TopUpKeyPool(unsigned int kpSize)
|
||||
{
|
||||
{
|
||||
LOCK(cs_wallet);
|
||||
@@ -1564,7 +1564,12 @@ bool CWallet::TopUpKeyPool()
|
||||
CWalletDB walletdb(strWalletFile);
|
||||
|
||||
// Top up key pool
|
||||
unsigned int nTargetSize = max(GetArg("-keypool", 100), 0LL);
|
||||
unsigned int nTargetSize;
|
||||
if (kpSize > 0)
|
||||
nTargetSize = kpSize;
|
||||
else
|
||||
nTargetSize = max(GetArg("-keypool", 100), 0LL);
|
||||
|
||||
while (setKeyPool.size() < (nTargetSize + 1))
|
||||
{
|
||||
int64 nEnd = 1;
|
||||
|
||||
Reference in New Issue
Block a user