Commit 97aba298 authored by inphi's avatar inphi

op-e2e: Fix flaky TestVerifyL2OutputRootEmptyBlock

parent d2edc627
...@@ -71,6 +71,8 @@ func testVerifyL2OutputRootEmptyBlock(t *testing.T, detached bool) { ...@@ -71,6 +71,8 @@ func testVerifyL2OutputRootEmptyBlock(t *testing.T, detached bool) {
// Avoids flaky test by avoiding reorgs at epoch 0 // Avoids flaky test by avoiding reorgs at epoch 0
t.Log("Wait for safe head to advance once for setup") t.Log("Wait for safe head to advance once for setup")
// Safe head doesn't exist at genesis. Wait for the first one before proceeding
require.NoError(t, waitForSafeHead(ctx, 1, rollupClient))
ss, err := l2Seq.BlockByNumber(ctx, big.NewInt(int64(rpc.SafeBlockNumber))) ss, err := l2Seq.BlockByNumber(ctx, big.NewInt(int64(rpc.SafeBlockNumber)))
require.NoError(t, err) require.NoError(t, err)
require.NoError(t, waitForSafeHead(ctx, ss.NumberU64()+cfg.DeployConfig.SequencerWindowSize+1, rollupClient)) require.NoError(t, waitForSafeHead(ctx, ss.NumberU64()+cfg.DeployConfig.SequencerWindowSize+1, rollupClient))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment