Skip to content

Commit fa4bfb4

Browse files
author
MarcoFalke
committed
[wallet, policy] ParameterInteraction: Don't allow 0 fee
1 parent faef293 commit fa4bfb4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
951951
if (mapArgs.count("-minrelaytxfee"))
952952
{
953953
CAmount n = 0;
954-
if (!ParseMoney(mapArgs["-minrelaytxfee"], n))
954+
if (!ParseMoney(mapArgs["-minrelaytxfee"], n) || 0 == n)
955955
return InitError(AmountErrMsg("minrelaytxfee", mapArgs["-minrelaytxfee"]));
956956
// High fee check is done afterward in CWallet::ParameterInteraction()
957957
::minRelayTxFee = CFeeRate(n);

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3492,7 +3492,7 @@ bool CWallet::ParameterInteraction()
34923492
if (mapArgs.count("-mintxfee"))
34933493
{
34943494
CAmount n = 0;
3495-
if (!ParseMoney(mapArgs["-mintxfee"], n))
3495+
if (!ParseMoney(mapArgs["-mintxfee"], n) || 0 == n)
34963496
return InitError(AmountErrMsg("mintxfee", mapArgs["-mintxfee"]));
34973497
if (n > HIGH_TX_FEE_PER_KB)
34983498
InitWarning(AmountHighWarn("-mintxfee") + " " +

0 commit comments

Comments
 (0)