Skip to content

Commit

Permalink
Adding EthTransactionValidator::validate_all function (#5006)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
  • Loading branch information
DoTheBestToGetTheBest and mattsse authored Oct 12, 2023
1 parent e86b80a commit 34bc498
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crates/transaction-pool/src/validate/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ where
) -> TransactionValidationOutcome<Tx> {
self.inner.validate_one(origin, transaction)
}

/// Validates all given transactions.
///
/// Returns all outcomes for the given transactions in the same order.
///
/// See also [Self::validate_one]
pub fn validate_all(
&self,
transaction: Vec<(TransactionOrigin, Tx)>,
) -> Vec<TransactionValidationOutcome<Tx>> {
transaction.into_iter().map(|(origin, tx)| self.validate_one(origin, tx)).collect()
}
}

#[async_trait::async_trait]
Expand Down

0 comments on commit 34bc498

Please sign in to comment.