From 0e863844edf128f849984fd5f2d35f4021122b51 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 16 Jul 2013 08:59:35 -0300 Subject: [PATCH] reenable rate limit on tx --- src/core.h | 1 - src/main.cpp | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core.h b/src/core.h index 6cd3f7ea..9955a7b5 100644 --- a/src/core.h +++ b/src/core.h @@ -215,7 +215,6 @@ public: } uint256 GetHash() const; - bool IsNewerThan(const CTransaction& old) const; bool IsSpamMessage() const { diff --git a/src/main.cpp b/src/main.cpp index e9c565e4..4a398832 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -923,8 +923,7 @@ bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fLimitFr // Continuously rate-limit free transactions // This mitigates 'penny-flooding' -- sending thousands of free transactions just to // be annoying or make others' transactions take longer to confirm. - /* - if (fLimitFree && nFees < CTransaction::nMinRelayTxFee) + if (fLimitFree) { static double dFreeCount; static int64 nLastTime; @@ -943,7 +942,7 @@ bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fLimitFr printf("Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize); dFreeCount += nSize; } - */ + // Check against previous transactions // This is done last to help prevent CPU exhaustion denial-of-service attacks. if (!CheckInputs(tx, state, view, true, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC))