diff options
| author | Jonas Schnelli <[email protected]> | 2017-01-17 08:55:30 +0100 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2017-03-24 10:28:39 +0100 |
| commit | 79df9df3482d71391dee1dd59054aed8f7bbfa6b (patch) | |
| tree | 6fcfc3d7002941d921faf4ee5c4c0440e1fcce46 /src/wallet/wallet.cpp | |
| parent | Make sure we always generate one keypool key at minimum (diff) | |
| download | discoin-79df9df3482d71391dee1dd59054aed8f7bbfa6b.tar.xz discoin-79df9df3482d71391dee1dd59054aed8f7bbfa6b.zip | |
Switch to 100% for the HD internal keypool size
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e7ac918b2..7ad48e37b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2946,13 +2946,11 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize) nTargetSize = std::max(GetArg("-keypool", DEFAULT_KEYPOOL_SIZE), (int64_t) 0); // count amount of available keys (internal, external) - // make sure the keypool of external keys fits the user selected target (-keypool) - // generate +20% internal keys (minimum 2 keys) + // make sure the keypool of external and internal keys fits the user selected target (-keypool) int64_t amountExternal = KeypoolCountExternalKeys(); int64_t amountInternal = setKeyPool.size() - amountExternal; - int64_t targetInternal = std::max((int64_t)ceil(nTargetSize * 0.2), (int64_t) 2); int64_t missingExternal = std::max(std::max((int64_t) nTargetSize, (int64_t) 1) - amountExternal, (int64_t) 0); - int64_t missingInternal = std::max(targetInternal - amountInternal, (int64_t) 0); + int64_t missingInternal = std::max(std::max((int64_t) nTargetSize, (int64_t) 1) - amountInternal, (int64_t) 0); if (!IsHDEnabled() || !CanSupportFeature(FEATURE_HD_SPLIT)) { |