@@ -551,8 +551,11 @@ impl<
551551 metered ! ( Task :: L1Finalization , self , handle_l1_finalized( * block_info) )
552552 }
553553 L1Notification :: BatchCommit { block_info, data } => {
554- metered ! ( Task :: BatchCommit , self , handle_batch_commit( * block_info, data. clone( ) ) )
555- match metered ! ( Task :: BatchCommit , self , handle_batch_commit( batch. clone( ) ) ) {
554+ match metered ! (
555+ Task :: BatchCommit ,
556+ self ,
557+ handle_batch_commit( * block_info, data. clone( ) )
558+ ) {
556559 Err ( ChainOrchestratorError :: BatchCommitGap ( batch_index) ) => {
557560 // Query database for the L1 block of the last known batch
558561 let reset_block =
@@ -598,11 +601,10 @@ impl<
598601 )
599602 }
600603 L1Notification :: L1Message { message, block_info, block_timestamp : _ } => {
601- metered ! ( Task :: L1Message , self , handle_l1_message( message. clone( ) , * block_info) )
602604 match metered ! (
603605 Task :: L1Message ,
604606 self ,
605- handle_l1_message( message. clone( ) , * block_number )
607+ handle_l1_message( message. clone( ) , * block_info )
606608 ) {
607609 Err ( ChainOrchestratorError :: L1MessageQueueGap ( queue_index) ) => {
608610 // Query database for the L1 block of the last known L1 message
@@ -825,12 +827,12 @@ impl<
825827 }
826828
827829 // Check if batch already exists in DB.
828- if let Some ( existing_batch) = tx. get_batch_by_index ( batch_clone . index ) . await ? {
829- if existing_batch. hash == batch_clone . hash {
830+ if let Some ( existing_batch) = tx. get_batch_by_index ( batch . index ) . await ? {
831+ if existing_batch. hash == batch . hash {
830832 // This means we have already processed this batch commit, we will skip
831833 // it.
832834 return Err ( ChainOrchestratorError :: DuplicateBatchCommit (
833- BatchInfo :: new ( batch_clone . index , batch_clone . hash ) ,
835+ BatchInfo :: new ( batch . index , batch . hash ) ,
834836 ) ) ;
835837 }
836838 // TODO: once batch reverts are implemented, we need to handle this
0 commit comments