Browse Source

Merge #8814: [wallet, policy] ParameterInteraction: Don't allow 0 fee

fa4bfb4 [wallet, policy] ParameterInteraction: Don't allow 0 fee (MarcoFalke)
0.14
Wladimir J. van der Laan 8 years ago
parent
commit
14b7b3fb9f
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      src/init.cpp
  2. 2
      src/wallet/wallet.cpp

2
src/init.cpp

@ -951,7 +951,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) @@ -951,7 +951,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if (mapArgs.count("-minrelaytxfee"))
{
CAmount n = 0;
if (!ParseMoney(mapArgs["-minrelaytxfee"], n))
if (!ParseMoney(mapArgs["-minrelaytxfee"], n) || 0 == n)
return InitError(AmountErrMsg("minrelaytxfee", mapArgs["-minrelaytxfee"]));
// High fee check is done afterward in CWallet::ParameterInteraction()
::minRelayTxFee = CFeeRate(n);

2
src/wallet/wallet.cpp

@ -3492,7 +3492,7 @@ bool CWallet::ParameterInteraction() @@ -3492,7 +3492,7 @@ bool CWallet::ParameterInteraction()
if (mapArgs.count("-mintxfee"))
{
CAmount n = 0;
if (!ParseMoney(mapArgs["-mintxfee"], n))
if (!ParseMoney(mapArgs["-mintxfee"], n) || 0 == n)
return InitError(AmountErrMsg("mintxfee", mapArgs["-mintxfee"]));
if (n > HIGH_TX_FEE_PER_KB)
InitWarning(AmountHighWarn("-mintxfee") + " " +

Loading…
Cancel
Save