Skip to content

Commit

Permalink
improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Oct 2, 2024
1 parent 7a5ce76 commit f4f305c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions relayer/relays/execution/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ func (r *Relay) Start(ctx context.Context, eg *errgroup.Group) error {

for _, ev := range events {
err = r.waitAndSend(ctx, ev)
if err != nil {
switch {
case errors.Is(err, header.ErrBeaconHeaderNotFinalized):
log.WithField("nonce", ev.Nonce).Info("beacon header not finalized yet")
break
case err != nil:
return fmt.Errorf("submit message: %w", err)
}
}
Expand Down Expand Up @@ -423,8 +427,7 @@ func (r *Relay) doSubmit(ctx context.Context, ev *contracts.GatewayOutboundMessa
log.Info("getting execution proof")
proof, err := r.beaconHeader.FetchExecutionProof(*blockHeader.ParentBeaconRoot, r.config.InstantVerification)
if errors.Is(err, header.ErrBeaconHeaderNotFinalized) {
logger.Warn("beacon header not finalized, just skipped")
return nil
return err
}
if err != nil {
return fmt.Errorf("fetch execution header proof: %w", err)
Expand Down

0 comments on commit f4f305c

Please sign in to comment.