From 26d3a89b1cf70fc33bd64b6350e32be02cfe6e26 Mon Sep 17 00:00:00 2001 From: Bardi Harborow Date: Sat, 29 Mar 2014 05:17:28 -0400 Subject: [PATCH] nHighTransactionFeeWarning (bitcoin/bitcoin@ffeb47366df02b7f859ce3e64f2304967c837e8e) --- src/init.cpp | 2 +- src/wallet.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 1350f6e5a..5ec2245ce 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -585,7 +585,7 @@ bool AppInit2(boost::thread_group& threadGroup) { if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee)) return InitError(strprintf(_("Invalid amount for -paytxfee=: '%s'"), mapArgs["-paytxfee"])); - if (nTransactionFee > 25 * COIN) + if (nTransactionFee > nHighTransactionFeeWarning) InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.")); } diff --git a/src/wallet.h b/src/wallet.h index a9fa811e3..50885d0d2 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -28,6 +28,9 @@ extern int64_t nTransactionFee; extern bool bSpendZeroConfChange; +// -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB +static const int nHighTransactionFeeWarning = 25 * COIN; + class CAccountingEntry; class CCoinControl; class COutput;