diff --git a/bin/citrea/tests/e2e/mod.rs b/bin/citrea/tests/e2e/mod.rs index c35adbba25..7a932d9fb3 100644 --- a/bin/citrea/tests/e2e/mod.rs +++ b/bin/citrea/tests/e2e/mod.rs @@ -1342,6 +1342,10 @@ async fn test_prover_sync_with_commitments() -> Result<(), anyhow::Error> { // a new MockDa block, which in turn causes the sequencer to publish an extra soft confirmation // becase it must not skip blocks. wait_for_l2_block(&prover_node_test_client, 8, None).await; + // Allow for the L2 block to be commited and stored + // Otherwise, the L2 block height might be registered but it hasn't + // been processed inside the EVM yet. + sleep(Duration::from_secs(1)).await; assert_eq!(prover_node_test_client.eth_block_number().await, 8); // on the 8th DA block, we should have a proof let mut blobs = da_service.get_block_at(4).await.unwrap().blobs; @@ -1510,6 +1514,10 @@ async fn test_reopen_prover() -> Result<(), anyhow::Error> { wait_for_l2_block(&seq_test_client, 6, None).await; // Still should have 4 blocks there are no commitments yet wait_for_l2_block(&prover_node_test_client, 6, None).await; + // Allow for the L2 block to be commited and stored + // Otherwise, the L2 block height might be registered but it hasn't + // been processed inside the EVM yet. + sleep(Duration::from_secs(1)).await; assert_eq!(prover_node_test_client.eth_block_number().await, 6); thread_kill_sender.send("kill").unwrap();