File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ where
238238 pub async fn validate_all_with_origin (
239239 & self ,
240240 origin : TransactionOrigin ,
241- transactions : Vec < Tx > ,
241+ transactions : impl IntoIterator < Item = Tx > + Send ,
242242 ) -> Vec < TransactionValidationOutcome < Tx > > {
243243 futures_util:: future:: join_all (
244244 transactions. into_iter ( ) . map ( |tx| self . validate_one ( origin, tx) ) ,
@@ -347,7 +347,7 @@ where
347347 async fn validate_transactions_with_origin (
348348 & self ,
349349 origin : TransactionOrigin ,
350- transactions : Vec < Self :: Transaction > ,
350+ transactions : impl IntoIterator < Item = Self :: Transaction > + Send ,
351351 ) -> Vec < TransactionValidationOutcome < Self :: Transaction > > {
352352 self . validate_all_with_origin ( origin, transactions) . await
353353 }
Original file line number Diff line number Diff line change @@ -248,11 +248,11 @@ where
248248 async fn validate_all (
249249 & self ,
250250 origin : TransactionOrigin ,
251- transactions : impl IntoIterator < Item = V :: Transaction > ,
251+ transactions : impl IntoIterator < Item = V :: Transaction > + Send ,
252252 ) -> Vec < ( TxHash , TransactionValidationOutcome < V :: Transaction > ) > {
253253 self . pool
254254 . validator ( )
255- . validate_transactions ( transactions . into_iter ( ) . map ( |tx| ( origin, tx ) ) . collect ( ) )
255+ . validate_transactions_with_origin ( origin, transactions )
256256 . await
257257 . into_iter ( )
258258 . map ( |tx| ( tx. tx_hash ( ) , tx) )
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ where
113113 pub fn validate_all_with_origin (
114114 & self ,
115115 origin : TransactionOrigin ,
116- transactions : Vec < Tx > ,
116+ transactions : impl IntoIterator < Item = Tx > + Send ,
117117 ) -> Vec < TransactionValidationOutcome < Tx > > {
118118 self . inner . validate_batch_with_origin ( origin, transactions)
119119 }
@@ -144,7 +144,7 @@ where
144144 async fn validate_transactions_with_origin (
145145 & self ,
146146 origin : TransactionOrigin ,
147- transactions : Vec < Self :: Transaction > ,
147+ transactions : impl IntoIterator < Item = Self :: Transaction > + Send ,
148148 ) -> Vec < TransactionValidationOutcome < Self :: Transaction > > {
149149 self . validate_all_with_origin ( origin, transactions)
150150 }
@@ -648,7 +648,7 @@ where
648648 fn validate_batch_with_origin (
649649 & self ,
650650 origin : TransactionOrigin ,
651- transactions : Vec < Tx > ,
651+ transactions : impl IntoIterator < Item = Tx > + Send ,
652652 ) -> Vec < TransactionValidationOutcome < Tx > > {
653653 let mut provider = None ;
654654 transactions
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ pub trait TransactionValidator: Debug + Send + Sync {
214214 fn validate_transactions_with_origin (
215215 & self ,
216216 origin : TransactionOrigin ,
217- transactions : Vec < Self :: Transaction > ,
217+ transactions : impl IntoIterator < Item = Self :: Transaction > + Send ,
218218 ) -> impl Future < Output = Vec < TransactionValidationOutcome < Self :: Transaction > > > + Send {
219219 let futures = transactions. into_iter ( ) . map ( |tx| self . validate_transaction ( origin, tx) ) ;
220220 futures_util:: future:: join_all ( futures)
@@ -261,7 +261,7 @@ where
261261 async fn validate_transactions_with_origin (
262262 & self ,
263263 origin : TransactionOrigin ,
264- transactions : Vec < Self :: Transaction > ,
264+ transactions : impl IntoIterator < Item = Self :: Transaction > + Send ,
265265 ) -> Vec < TransactionValidationOutcome < Self :: Transaction > > {
266266 match self {
267267 Self :: Left ( v) => v. validate_transactions_with_origin ( origin, transactions) . await ,
You can’t perform that action at this time.
0 commit comments