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

This commit is contained in:
MarcoFalke 2016-09-26 14:49:47 +02:00
parent faef293cf3
commit fa4bfb4819
2 changed files with 2 additions and 2 deletions

View file

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

View file

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