Skip to content

Commit

Permalink
fix cmnts
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 committed Dec 12, 2024
1 parent 750ca47 commit c91514c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cmd/staking-expiry-checker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,19 @@ func main() {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer cancel()

// Create new DB client
// Create DB client
dbClient, err := db.New(ctx, cfg.Db)
if err != nil {
log.Fatal().Err(err).Msg("error while creating db client")
}

// Create BTC client
btcClient, err := btcclient.NewBtcClient(&cfg.Btc)
if err != nil {
log.Fatal().Err(err).Msg("error while creating btc client")
}

// Create BTC notifier
btcNotifier, err := btcclient.NewBTCNotifier(
&cfg.Btc,
&btcclient.EmptyHintCache{},
Expand All @@ -65,10 +67,7 @@ func main() {
log.Fatal().Err(err).Msg("error while creating btc notifier")
}

if err := btcNotifier.Start(); err != nil {
log.Fatal().Err(err).Msg("failed to start btc chain notifier")
}

// Create service
service := services.NewService(cfg, params, dbClient, btcNotifier, btcClient)
if err := service.RunUntilShutdown(ctx); err != nil {
log.Fatal().Err(err).Msg("failed to start service")
Expand Down

0 comments on commit c91514c

Please sign in to comment.