Skip to content

Commit

Permalink
Fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Nov 5, 2024
1 parent 16f8d21 commit 4651e8f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions relayer/relays/execution/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"
"errors"
"fmt"
"github.com/snowfork/snowbridge/relayer/ofac"
"math/big"
"sort"
"time"

"github.com/snowfork/snowbridge/relayer/ofac"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
Expand Down Expand Up @@ -388,8 +389,9 @@ func (r *Relay) waitAndSend(ctx context.Context, ev *contracts.GatewayOutboundMe
return nil
}
// Check if the beacon header is finalized
if r.isInFinalizedBlock(ctx, ev) != nil {
return err
err = r.isInFinalizedBlock(ctx, ev)
if err != nil {
return fmt.Errorf("check beacon header finalized: %w", err)
}
if cnt == waitingPeriod {
break
Expand Down

0 comments on commit 4651e8f

Please sign in to comment.