@@ -350,37 +350,36 @@ impl<P: Provider + Clone> ExecutionEngine<P> {
350350 // This prevents NonceTooLow errors when txs from same sender arrive out of order
351351 let mut sorted_txs: Vec < ( usize , & Bytes ) > = transactions. iter ( ) . enumerate ( ) . collect ( ) ;
352352 sorted_txs. sort_by ( |( _, a) , ( _, b) | {
353- let parse_tx =
354- |tx_bytes : & Bytes | -> Option < ( alloy_primitives:: Address , u64 ) > {
355- let tx_envelope = TxEnvelope :: decode_2718 ( & mut tx_bytes. as_ref ( ) ) . ok ( ) ?;
356- let nonce = tx_envelope. nonce ( ) ;
357-
358- // Recover sender from signature
359- let sender = match & tx_envelope {
360- TxEnvelope :: Legacy ( signed) => signed
361- . signature ( )
362- . recover_address_from_prehash ( & signed. signature_hash ( ) )
363- . ok ( ) ,
364- TxEnvelope :: Eip2930 ( signed) => signed
365- . signature ( )
366- . recover_address_from_prehash ( & signed. signature_hash ( ) )
367- . ok ( ) ,
368- TxEnvelope :: Eip1559 ( signed) => signed
369- . signature ( )
370- . recover_address_from_prehash ( & signed. signature_hash ( ) )
371- . ok ( ) ,
372- TxEnvelope :: Eip4844 ( signed) => signed
373- . signature ( )
374- . recover_address_from_prehash ( & signed. signature_hash ( ) )
375- . ok ( ) ,
376- TxEnvelope :: Eip7702 ( signed) => signed
377- . signature ( )
378- . recover_address_from_prehash ( & signed. signature_hash ( ) )
379- . ok ( ) ,
380- } ?;
381-
382- Some ( ( sender, nonce) )
383- } ;
353+ let parse_tx = |tx_bytes : & Bytes | -> Option < ( alloy_primitives:: Address , u64 ) > {
354+ let tx_envelope = TxEnvelope :: decode_2718 ( & mut tx_bytes. as_ref ( ) ) . ok ( ) ?;
355+ let nonce = tx_envelope. nonce ( ) ;
356+
357+ // Recover sender from signature
358+ let sender = match & tx_envelope {
359+ TxEnvelope :: Legacy ( signed) => signed
360+ . signature ( )
361+ . recover_address_from_prehash ( & signed. signature_hash ( ) )
362+ . ok ( ) ,
363+ TxEnvelope :: Eip2930 ( signed) => signed
364+ . signature ( )
365+ . recover_address_from_prehash ( & signed. signature_hash ( ) )
366+ . ok ( ) ,
367+ TxEnvelope :: Eip1559 ( signed) => signed
368+ . signature ( )
369+ . recover_address_from_prehash ( & signed. signature_hash ( ) )
370+ . ok ( ) ,
371+ TxEnvelope :: Eip4844 ( signed) => signed
372+ . signature ( )
373+ . recover_address_from_prehash ( & signed. signature_hash ( ) )
374+ . ok ( ) ,
375+ TxEnvelope :: Eip7702 ( signed) => signed
376+ . signature ( )
377+ . recover_address_from_prehash ( & signed. signature_hash ( ) )
378+ . ok ( ) ,
379+ } ?;
380+
381+ Some ( ( sender, nonce) )
382+ } ;
384383
385384 match ( parse_tx ( a) , parse_tx ( b) ) {
386385 ( Some ( ( sender_a, nonce_a) ) , Some ( ( sender_b, nonce_b) ) ) => {
0 commit comments