|
|
@ -66,7 +66,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes |
|
|
|
// Extremely large transactions with lots of inputs can cost the network
|
|
|
|
// Extremely large transactions with lots of inputs can cost the network
|
|
|
|
// almost as much to process as they cost the sender in fees, because
|
|
|
|
// almost as much to process as they cost the sender in fees, because
|
|
|
|
// computing signature hashes is O(ninputs*txsize). Limiting transactions
|
|
|
|
// computing signature hashes is O(ninputs*txsize). Limiting transactions
|
|
|
|
// to MAX_STANDARD_TX_SIZE mitigates CPU exhaustion attacks.
|
|
|
|
// to MAX_STANDARD_TX_WEIGHT mitigates CPU exhaustion attacks.
|
|
|
|
unsigned int sz = GetTransactionWeight(tx); |
|
|
|
unsigned int sz = GetTransactionWeight(tx); |
|
|
|
if (sz >= MAX_STANDARD_TX_WEIGHT) { |
|
|
|
if (sz >= MAX_STANDARD_TX_WEIGHT) { |
|
|
|
reason = "tx-size"; |
|
|
|
reason = "tx-size"; |
|
|
|