aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-01-29 13:11:57 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-01-29 13:12:02 +0100
commit019280617aad7008e523e0bbe19cd76fd59d5e25 (patch)
tree146027708867802675a50eb589361dc23d5355cd /src/main.cpp
parent69e2a4003be7873257372e775765d489848a826f (diff)
parent2dfeaa1ad03e7768fb28bfde7f929ac57dfff120 (diff)
Merge #6842: limitfreerelay edge case bugfix
2dfeaa1 limitfreerelay edge case bugfix: (ptschip)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c8ea62758b..8beff9769a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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;