From 2a25c8c8bb5c4f7bb345c1f9f52419af2fadb207 Mon Sep 17 00:00:00 2001 From: crowning- Date: Sun, 4 Oct 2015 13:55:33 +0200 Subject: [PATCH 1/3] UI: wrong keypool default value displayed --- src/init.cpp | 2 +- src/rpcwallet.cpp | 2 +- src/wallet.cpp | 4 ++-- src/wallet.h | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 803c375835..27d0662fb3 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)"), 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..2aa6d86a49 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=1000) 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; From a29e1ce0bd733bc647689ea0db4c0d83cf26e28e Mon Sep 17 00:00:00 2001 From: crowning- Date: Sun, 4 Oct 2015 14:20:45 +0200 Subject: [PATCH 2/3] -keypool= help text modified --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 27d0662fb3..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)"), DEFAULT_KEYPOOL_SIZE) + "\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"; From 3f378fe455f0b5e6875f4d83e5d63a0ceb68af81 Mon Sep 17 00:00:00 2001 From: crowning- Date: Mon, 5 Oct 2015 22:50:54 +0200 Subject: [PATCH 3/3] UI: wrong keypool default value displayed part 2 --- src/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 2aa6d86a49..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=1000) 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", "")