mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(pool): oversized data error (#13565)
This commit is contained in:
@ -235,14 +235,11 @@ where
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Reject transactions over defined size to prevent DOS attacks
|
// Reject transactions over defined size to prevent DOS attacks
|
||||||
let transaction_size = transaction.size();
|
let tx_input_len = transaction.input().len();
|
||||||
if transaction_size > self.max_tx_input_bytes {
|
if tx_input_len > self.max_tx_input_bytes {
|
||||||
return TransactionValidationOutcome::Invalid(
|
return TransactionValidationOutcome::Invalid(
|
||||||
transaction,
|
transaction,
|
||||||
InvalidPoolTransactionError::OversizedData(
|
InvalidPoolTransactionError::OversizedData(tx_input_len, self.max_tx_input_bytes),
|
||||||
transaction_size,
|
|
||||||
self.max_tx_input_bytes,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user