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

fa4bfb4 [wallet, policy] ParameterInteraction: Don't allow 0 fee (MarcoFalke)
This commit is contained in:
Wladimir J. van der Laan 2016-09-28 08:08:02 +02:00 committed by Alexander Block
parent a75d6110ee
commit 8b8362ff15
2 changed files with 2 additions and 2 deletions

View File

@ -1119,7 +1119,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);

View File

@ -4786,7 +4786,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") + " " +