Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/transaction-pool/src/validate/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,20 @@ where
}
}

/// Validates a single transaction with the provided state provider.
pub fn validate_one_with_state_provider(
&self,
origin: TransactionOrigin,
transaction: Tx,
state: impl AccountInfoReader,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works because auto impled for &

) -> TransactionValidationOutcome<Tx> {
let tx = match self.validate_one_no_state(origin, transaction) {
Ok(tx) => tx,
Err(invalid_outcome) => return invalid_outcome,
};
self.validate_one_against_state(origin, tx, state)
}

/// Performs stateless validation on single transaction. Returns unaltered input transaction
/// if all checks pass, so transaction can continue through to stateful validation as argument
/// to [`validate_one_against_state`](Self::validate_one_against_state).
Expand Down
Loading