Skip to content

Commit

Permalink
Allow setting minrelaytxfee to 0
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
morcos committed Mar 3, 2017
1 parent 359e8a0 commit 7d4e950
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,13 +977,14 @@ bool AppInitParameterInteraction()
// If you are mining, be careful setting this:
// if you set it to zero then
// a transaction spammer can cheaply fill blocks using
// 1-satoshi-fee transactions. It should be set above the real
// 0-fee transactions. It should be set above the real
// cost to you of processing a transaction.
if (IsArgSet("-minrelaytxfee"))
{
CAmount n = 0;
if (!ParseMoney(GetArg("-minrelaytxfee", ""), n) || 0 == n)
if (!ParseMoney(GetArg("-minrelaytxfee", ""), n)) {
return InitError(AmountErrMsg("minrelaytxfee", GetArg("-minrelaytxfee", "")));
}
// High fee check is done afterward in CWallet::ParameterInteraction()
::minRelayTxFee = CFeeRate(n);
} else if (incrementalRelayFee > ::minRelayTxFee) {
Expand Down

0 comments on commit 7d4e950

Please sign in to comment.