Skip to content

Commit

Permalink
use default confs instead of tryign to handle a parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Nov 15, 2022
1 parent 760f41c commit 271e3a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/relayer/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ var (
"RELAYER_ECDSA_KEY",
"CONFIRMATIONS_BEFORE_PROCESSING",
}

defaultConfirmations = 15
)

func Run(mode relayer.Mode, layer relayer.Layer) {
Expand Down Expand Up @@ -111,7 +113,7 @@ func makeIndexers(layer relayer.Layer, db *gorm.DB) ([]*indexer.Service, func(),

confirmations, err := strconv.Atoi(os.Getenv("CONFIRMATIONS_BEFORE_PROCESSING"))
if err != nil || confirmations <= 0 {
return nil, nil, err
confirmations = defaultConfirmations
}

indexers := make([]*indexer.Service, 0)
Expand Down

0 comments on commit 271e3a9

Please sign in to comment.