mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 07:17:53 +00:00
reenable rate limit on tx
This commit is contained in:
parent
5018edc8ca
commit
0e863844ed
@ -215,7 +215,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint256 GetHash() const;
|
uint256 GetHash() const;
|
||||||
bool IsNewerThan(const CTransaction& old) const;
|
|
||||||
|
|
||||||
bool IsSpamMessage() const
|
bool IsSpamMessage() const
|
||||||
{
|
{
|
||||||
|
@ -923,8 +923,7 @@ bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fLimitFr
|
|||||||
// Continuously rate-limit free transactions
|
// Continuously rate-limit free transactions
|
||||||
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to
|
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to
|
||||||
// be annoying or make others' transactions take longer to confirm.
|
// be annoying or make others' transactions take longer to confirm.
|
||||||
/*
|
if (fLimitFree)
|
||||||
if (fLimitFree && nFees < CTransaction::nMinRelayTxFee)
|
|
||||||
{
|
{
|
||||||
static double dFreeCount;
|
static double dFreeCount;
|
||||||
static int64 nLastTime;
|
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);
|
printf("Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
|
||||||
dFreeCount += nSize;
|
dFreeCount += nSize;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
// Check against previous transactions
|
// Check against previous transactions
|
||||||
// This is done last to help prevent CPU exhaustion denial-of-service attacks.
|
// 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))
|
if (!CheckInputs(tx, state, view, true, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC))
|
||||||
|
Loading…
Reference in New Issue
Block a user