diff --git a/src/init.cpp b/src/init.cpp index 803c375835..34bc580f19 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -343,7 +343,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += " -keepasskey= " + _("KeePassHttp key for AES encrypted communication with KeePass") + "\n"; strUsage += " -keepassid= " + _("KeePassHttp id for the established association") + "\n"; strUsage += " -keepassname= " + _("Name to construct url for KeePass entry that stores the wallet passphrase") + "\n"; - strUsage += " -keypool= " + strprintf(_("Set key pool size to (default: %u)"), 100) + "\n"; + strUsage += " -keypool= " + strprintf(_("Set key pool size to (default: %u). Run 'keypoolrefill' to apply this to already existing wallets"), DEFAULT_KEYPOOL_SIZE) + "\n"; if (GetBoolArg("-help-debug", false)) strUsage += " -mintxfee= " + strprintf(_("Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n"; strUsage += " -paytxfee= " + strprintf(_("Fee (in DASH/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n"; diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index c60c819a35..7f7408f694 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -1685,7 +1685,7 @@ Value keypoolrefill(const Array& params, bool fHelp) "\nFills the keypool." + HelpRequiringPassphrase() + "\n" "\nArguments\n" - "1. newsize (numeric, optional, default=100) The new keypool size\n" + "1. newsize (numeric, optional, default=" + itostr(DEFAULT_KEYPOOL_SIZE) + ") The new keypool size\n" "\nExamples:\n" + HelpExampleCli("keypoolrefill", "") + HelpExampleRpc("keypoolrefill", "") diff --git a/src/wallet.cpp b/src/wallet.cpp index 03580682eb..7a73760225 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -2639,7 +2639,7 @@ bool CWallet::NewKeyPool() if (IsLocked()) return false; - int64_t nKeys = max(GetArg("-keypool", 1000), (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; @@ -2666,7 +2666,7 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize) if (kpSize > 0) nTargetSize = kpSize; else - nTargetSize = max(GetArg("-keypool", 1000), (int64_t) 0); + nTargetSize = max(GetArg("-keypool", DEFAULT_KEYPOOL_SIZE), (int64_t) 0); while (setKeyPool.size() < (nTargetSize + 1)) { diff --git a/src/wallet.h b/src/wallet.h index 069b50520e..f65ed8b983 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -48,6 +48,8 @@ static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN; static const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWarning; //! Largest (in bytes) free transaction we're willing to create static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000; +//! -keypool default +static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000; class CAccountingEntry; class CCoinControl;