Skip to content

Commit

Permalink
Merge #6842: limitfreerelay edge case bugfix
Browse files Browse the repository at this point in the history
2dfeaa1 limitfreerelay edge case bugfix: (ptschip)
  • Loading branch information
laanwj committed Jan 29, 2016
2 parents 69e2a40 + 2dfeaa1 commit 0192806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
nLastTime = nNow;
// -limitfreerelay unit is thousand-bytes-per-minute
// At default rate it would take over a month to fill 1GB
if (dFreeCount >= GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) * 10 * 1000)
if (dFreeCount + nSize >= GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) * 10 * 1000)
return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "rate limited free transaction");
LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
dFreeCount += nSize;
Expand Down

0 comments on commit 0192806

Please sign in to comment.