Commit 43a5be58 authored by protolambda's avatar protolambda Committed by GitHub

op-e2e: fix finalize flake (#10689)

parent 14f76fb3
...@@ -132,6 +132,11 @@ func waitForBlockTag(number *big.Int, client *ethclient.Client, timeout time.Dur ...@@ -132,6 +132,11 @@ func waitForBlockTag(number *big.Int, client *ethclient.Client, timeout time.Dur
case <-ticker.C: case <-ticker.C:
block, err := client.BlockByNumber(ctx, tagBigInt) block, err := client.BlockByNumber(ctx, tagBigInt)
if err != nil { if err != nil {
// If block is not found (e.g. upon startup of chain, when there is no "finalized block" yet)
// then it may be found later. Keep wait loop running.
if strings.Contains(err.Error(), "block not found") {
continue
}
return nil, err return nil, err
} }
if block != nil && block.NumberU64() >= number.Uint64() { if block != nil && block.NumberU64() >= number.Uint64() {
......
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