Skip to content

Commit

Permalink
Fix error handling (#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong authored Nov 6, 2024
1 parent a45c156 commit b4f0473
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 b4f0473

Please sign in to comment.