Constrain constant values to a single location in code

This commit is contained in:
Luke Dashjr
2015-06-27 19:21:41 +00:00
committed by MarcoFalke
parent 92aa7311d6
commit b966aa836a
24 changed files with 118 additions and 78 deletions

View File

@@ -2260,7 +2260,7 @@ bool CWallet::NewKeyPool()
if (IsLocked())
return false;
int64_t nKeys = max(GetArg("-keypool", 100), (int64_t)0);
int64_t nKeys = max(GetArg("-keypool", DEFAULT_KEYPOOL_SIZE), (int64_t)0);
for (int i = 0; i < nKeys; i++)
{
int64_t nIndex = i+1;
@@ -2287,7 +2287,7 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
if (kpSize > 0)
nTargetSize = kpSize;
else
nTargetSize = max(GetArg("-keypool", 100), (int64_t) 0);
nTargetSize = max(GetArg("-keypool", DEFAULT_KEYPOOL_SIZE), (int64_t) 0);
while (setKeyPool.size() < (nTargetSize + 1))
{