Skip to content

Commit

Permalink
fix(pool): oversized data error (#13565)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrasiuk authored Dec 27, 2024
1 parent 4ef9537 commit c35fe4a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/transaction-pool/src/validate/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,11 @@ where
};

// Reject transactions over defined size to prevent DOS attacks
let transaction_size = transaction.size();
if transaction_size > self.max_tx_input_bytes {
let tx_input_len = transaction.input().len();
if tx_input_len > self.max_tx_input_bytes {
return TransactionValidationOutcome::Invalid(
transaction,
InvalidPoolTransactionError::OversizedData(
transaction_size,
self.max_tx_input_bytes,
),
InvalidPoolTransactionError::OversizedData(tx_input_len, self.max_tx_input_bytes),
)
}

Expand Down

0 comments on commit c35fe4a

Please sign in to comment.