mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Adding EthTransactionValidator::validate_all function (#5006)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
committed by
GitHub
parent
e86b80a019
commit
34bc4983e7
@ -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]
|
||||
|
||||
Reference in New Issue
Block a user