Skip to content

Commit 77ed59d

Browse files
committed
wallet: Introduce constant for -txconfirmtarget default
1 parent a6d2e31 commit 77ed59d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/init.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ std::string HelpMessage(HelpMessageMode mode)
333333
strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup"));
334334
strUsage += HelpMessageOpt("-sendfreetransactions", strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0));
335335
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1));
336-
strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), 1));
336+
strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), DEFAULT_TX_CONFIRM_TARGET));
337337
strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees to use in a single wallet transaction; setting this too low may abort large transactions (default: %s)"),
338338
FormatMoney(maxTxFee)));
339339
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup"));
@@ -834,7 +834,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
834834
mapArgs["-maxtxfee"], ::minRelayTxFee.ToString()));
835835
}
836836
}
837-
nTxConfirmTarget = GetArg("-txconfirmtarget", 1);
837+
nTxConfirmTarget = GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET);
838838
bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", true);
839839
fSendFreeTransactions = GetBoolArg("-sendfreetransactions", false);
840840

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ using namespace std;
3030
*/
3131
CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
3232
CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
33-
unsigned int nTxConfirmTarget = 1;
33+
unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET;
3434
bool bSpendZeroConfChange = true;
3535
bool fSendFreeTransactions = false;
3636
bool fPayAtLeastCustomFee = true;

src/wallet/wallet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ static const CAmount DEFAULT_TRANSACTION_FEE = 0;
4444
static const CAmount nHighTransactionFeeWarning = 0.01 * COIN;
4545
//! -maxtxfee default
4646
static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN;
47+
//! -txconfirmtarget default
48+
static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 1;
4749
//! -maxtxfee will warn if called with a higher fee than this amount (in satoshis)
4850
static const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWarning;
4951
//! Largest (in bytes) free transaction we're willing to create

0 commit comments

Comments
 (0)