Permalink
Browse files

Merge #6842: limitfreerelay edge case bugfix

2dfeaa1 limitfreerelay edge case bugfix: (ptschip)
  • Loading branch information...
laanwj committed Jan 29, 2016
2 parents 69e2a40 + 2dfeaa1 commit 019280617aad7008e523e0bbe19cd76fd59d5e25
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main.cpp
View
@@ -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;

0 comments on commit 0192806

Please sign in to comment.