Skip to content

Commit 7d4e950

Browse files
committed
Allow setting minrelaytxfee to 0
Setting minrelaytxfee to 0 will allow all transactions regardless of fee to enter your mempool until it reaches its size limit. However now that mempool limiting is governed by a separate incrementalrelay fee, it is an unnecessary restriction to prevent a minrelaytxfee of 0.
1 parent 359e8a0 commit 7d4e950

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/init.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,13 +977,14 @@ bool AppInitParameterInteraction()
977977
// If you are mining, be careful setting this:
978978
// if you set it to zero then
979979
// a transaction spammer can cheaply fill blocks using
980-
// 1-satoshi-fee transactions. It should be set above the real
980+
// 0-fee transactions. It should be set above the real
981981
// cost to you of processing a transaction.
982982
if (IsArgSet("-minrelaytxfee"))
983983
{
984984
CAmount n = 0;
985-
if (!ParseMoney(GetArg("-minrelaytxfee", ""), n) || 0 == n)
985+
if (!ParseMoney(GetArg("-minrelaytxfee", ""), n)) {
986986
return InitError(AmountErrMsg("minrelaytxfee", GetArg("-minrelaytxfee", "")));
987+
}
987988
// High fee check is done afterward in CWallet::ParameterInteraction()
988989
::minRelayTxFee = CFeeRate(n);
989990
} else if (incrementalRelayFee > ::minRelayTxFee) {

0 commit comments

Comments
 (0)