@@ -193,7 +193,7 @@ async fn test_l1_sync_batch_finalized() -> eyre::Result<()> {
193193 let mut fixture = TestFixture :: builder ( )
194194 . followers ( 1 )
195195 . skip_l1_synced_notifications ( )
196- . with_anvil ( None , None , Some ( 22222222 ) , None , Some ( 4 ) )
196+ . with_anvil ( None , None , Some ( 22222222 ) , None , Some ( 2 ) )
197197 . build ( )
198198 . await ?;
199199
@@ -231,7 +231,9 @@ async fn test_l1_sync_batch_finalized() -> eyre::Result<()> {
231231 let finalize_batch_tx = read_test_transaction ( "finalizeBatch" , & i. to_string ( ) ) ?;
232232 fixture. anvil_inject_tx ( finalize_batch_tx) . await ?;
233233 }
234- fixture. anvil_mine_blocks ( 8 ) . await ?;
234+ let anvil_block_number = fixture. anvil_get_block_number ( ) . await ?;
235+ fixture. anvil_mine_blocks ( 4 ) . await ?;
236+ fixture. expect_event ( ) . l1_block_finalized_at_least ( anvil_block_number) . await ?;
235237
236238 for i in 1 ..=3 {
237239 fixture. expect_event ( ) . batch_consolidated ( ) . await ?;
@@ -272,8 +274,8 @@ async fn test_l1_sync_batch_finalized() -> eyre::Result<()> {
272274 }
273275 let l1_synced_status = fixture. get_status ( 0 ) . await ?;
274276 assert ! (
275- batch_finalized_status . l2. fcs. safe_block_info( ) . number <
276- l1_synced_status . l2. fcs. safe_block_info( ) . number,
277+ l1_synced_status . l2. fcs. safe_block_info( ) . number >
278+ batch_finalized_status . l2. fcs. safe_block_info( ) . number,
277279 "Safe head should advance after L1 Synced when processing buffered BatchCommit events"
278280 ) ;
279281
@@ -299,8 +301,9 @@ async fn test_l1_sync_batch_finalized() -> eyre::Result<()> {
299301 "Finalized head should not advance before BatchFinalized event are finalized on L1"
300302 ) ;
301303
302- fixture. anvil_mine_blocks ( 8 ) . await ?;
303- fixture. expect_event ( ) . l1_block_finalized ( ) . await ?;
304+ let anvil_block_number = fixture. anvil_get_block_number ( ) . await ?;
305+ fixture. anvil_mine_blocks ( 4 ) . await ?;
306+ fixture. expect_event ( ) . l1_block_finalized_at_least ( anvil_block_number) . await ?;
304307
305308 // Step 8: Verify only finalized head advanced (safe head managed by BatchCommit)
306309 let batch_finalized_status = fixture. get_status ( 0 ) . await ?;
0 commit comments