Skip to content

Commit

Permalink
node/evm: fix Base safe block support
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Sep 25, 2023
1 parent bf61813 commit be96073
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/pkg/watchers/evm/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,15 @@ func (w *Watcher) Run(parentCtx context.Context) error {
return fmt.Errorf("failed to create polygon connector: %w", err)
}
} else if w.chainID == vaa.ChainIDBase && !w.unsafeDevMode {
useFinalizedBlocks = true
safeBlocksSupported = true
baseConnector, err := connectors.NewEthereumConnector(timeout, w.networkName, w.url, w.contract, logger)
if err != nil {
ethConnectionErrors.WithLabelValues(w.networkName, "dial_error").Inc()
p2p.DefaultRegistry.AddErrorCount(w.chainID, 1)
return fmt.Errorf("dialing eth client failed: %w", err)
}
w.ethConn, err = connectors.NewBlockPollConnector(ctx, baseConnector, finalizers.NewDefaultFinalizer(), 250*time.Millisecond, true, true)
w.ethConn, err = connectors.NewBlockPollConnector(ctx, baseConnector, finalizers.NewDefaultFinalizer(), 250*time.Millisecond, useFinalizedBlocks, safeBlocksSupported)
if err != nil {
ethConnectionErrors.WithLabelValues(w.networkName, "dial_error").Inc()
p2p.DefaultRegistry.AddErrorCount(w.chainID, 1)
Expand Down

0 comments on commit be96073

Please sign in to comment.