@@ -413,12 +413,11 @@ impl DatabaseReadOperations for Database {
413413 async fn get_batch_by_index (
414414 & self ,
415415 batch_index : u64 ,
416- processed : Option < bool > ,
417416 ) -> Result < Option < BatchCommitData > , DatabaseError > {
418417 metered ! (
419418 DatabaseOperation :: GetBatchByIndex ,
420419 self ,
421- tx( move |tx| async move { tx. get_batch_by_index( batch_index, processed ) . await } )
420+ tx( move |tx| async move { tx. get_batch_by_index( batch_index) . await } )
422421 )
423422 }
424423
@@ -736,7 +735,7 @@ mod test {
736735 // Round trip the BatchCommitData through the database.
737736 db. insert_batch ( batch_commit. clone ( ) ) . await . unwrap ( ) ;
738737 let batch_commit_from_db =
739- db. get_batch_by_index ( batch_commit. index , None ) . await . unwrap ( ) . unwrap ( ) ;
738+ db. get_batch_by_index ( batch_commit. index ) . await . unwrap ( ) . unwrap ( ) ;
740739
741740 assert_eq ! ( batch_commit, batch_commit_from_db) ;
742741 }
@@ -1250,7 +1249,7 @@ mod test {
12501249
12511250 // Insert L2 blocks with different batch indices
12521251 for i in 100 ..110 {
1253- let batch_data = db. get_batch_by_index ( i, None ) . await . unwrap ( ) . unwrap ( ) ;
1252+ let batch_data = db. get_batch_by_index ( i) . await . unwrap ( ) . unwrap ( ) ;
12541253 let batch_info: BatchInfo = batch_data. into ( ) ;
12551254 let block_info = BlockInfo { number : 500 + i, hash : B256 :: arbitrary ( & mut u) . unwrap ( ) } ;
12561255
@@ -1419,9 +1418,9 @@ mod test {
14191418 db. set_finalized_l1_block_number ( 21 ) . await . unwrap ( ) ;
14201419
14211420 // Verify the batches and blocks were inserted correctly
1422- let retrieved_batch_1 = db. get_batch_by_index ( 1 , None ) . await . unwrap ( ) . unwrap ( ) ;
1423- let retrieved_batch_2 = db. get_batch_by_index ( 2 , None ) . await . unwrap ( ) . unwrap ( ) ;
1424- let retrieved_batch_3 = db. get_batch_by_index ( 3 , None ) . await . unwrap ( ) . unwrap ( ) ;
1421+ let retrieved_batch_1 = db. get_batch_by_index ( 1 ) . await . unwrap ( ) . unwrap ( ) ;
1422+ let retrieved_batch_2 = db. get_batch_by_index ( 2 ) . await . unwrap ( ) . unwrap ( ) ;
1423+ let retrieved_batch_3 = db. get_batch_by_index ( 3 ) . await . unwrap ( ) . unwrap ( ) ;
14251424 let retried_block_1 = db. get_l2_block_info_by_number ( 1 ) . await . unwrap ( ) . unwrap ( ) ;
14261425 let retried_block_2 = db. get_l2_block_info_by_number ( 2 ) . await . unwrap ( ) . unwrap ( ) ;
14271426 let retried_block_3 = db. get_l2_block_info_by_number ( 3 ) . await . unwrap ( ) . unwrap ( ) ;
@@ -1442,9 +1441,9 @@ mod test {
14421441 assert_eq ! ( result, ( Some ( block_2) , Some ( 11 ) ) ) ;
14431442
14441443 // Verify that batches 2 and 3 are deleted
1445- let batch_1 = db. get_batch_by_index ( 1 , None ) . await . unwrap ( ) ;
1446- let batch_2 = db. get_batch_by_index ( 2 , None ) . await . unwrap ( ) ;
1447- let batch_3 = db. get_batch_by_index ( 3 , None ) . await . unwrap ( ) ;
1444+ let batch_1 = db. get_batch_by_index ( 1 ) . await . unwrap ( ) ;
1445+ let batch_2 = db. get_batch_by_index ( 2 ) . await . unwrap ( ) ;
1446+ let batch_3 = db. get_batch_by_index ( 3 ) . await . unwrap ( ) ;
14481447 assert ! ( batch_1. is_some( ) ) ;
14491448 assert ! ( batch_2. is_none( ) ) ;
14501449 assert ! ( batch_3. is_none( ) ) ;
0 commit comments