aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-03-31 09:01:10 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-03-31 09:01:16 +0200
commitb86ed6ff23fbc5a71587648c5ae547ad404e09f2 (patch)
tree7a9239ec8a0771e2c7cbca52bf51752d0ee83c6f /src
parente18bc583d41d97cdab93b7ffd111402628cfba19 (diff)
parentffeb47366df02b7f859ce3e64f2304967c837e8e (diff)
Merge pull request #3969
ffeb473 Add nHighTransactionFeeWarning as per #3969. (Bardi Harborow)
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp2
-rw-r--r--src/wallet.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index cd06e0c204..6e6e4beed9 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -575,7 +575,7 @@ bool AppInit2(boost::thread_group& threadGroup)
{
if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee))
return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s'"), mapArgs["-paytxfee"]));
- if (nTransactionFee > 0.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."));
}
bSpendZeroConfChange = GetArg("-spendzeroconfchange", true);
diff --git a/src/wallet.h b/src/wallet.h
index 487c258a20..ef02c90eda 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -27,6 +27,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 = 0.01 * COIN;
+
class CAccountingEntry;
class CCoinControl;
class COutput;