File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
crates/transaction-pool/src/validate Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,20 @@ where
247247 }
248248 }
249249
250+ /// Validates a single transaction with the provided state provider.
251+ pub fn validate_one_with_state_provider (
252+ & self ,
253+ origin : TransactionOrigin ,
254+ transaction : Tx ,
255+ state : impl AccountInfoReader ,
256+ ) -> TransactionValidationOutcome < Tx > {
257+ let tx = match self . validate_one_no_state ( origin, transaction) {
258+ Ok ( tx) => tx,
259+ Err ( invalid_outcome) => return invalid_outcome,
260+ } ;
261+ self . validate_one_against_state ( origin, tx, state)
262+ }
263+
250264 /// Performs stateless validation on single transaction. Returns unaltered input transaction
251265 /// if all checks pass, so transaction can continue through to stateful validation as argument
252266 /// to [`validate_one_against_state`](Self::validate_one_against_state).
You can’t perform that action at this time.
0 commit comments