Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 committed Dec 12, 2024
1 parent 8a664db commit 750ca47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
6 changes: 5 additions & 1 deletion internal/services/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ func (s *Service) RunUntilShutdown(ctx context.Context) error {
if err := s.btcNotifier.Start(); err != nil {
return fmt.Errorf("failed to start btc chain notifier: %w", err)
}
defer s.btcNotifier.Stop()
defer func() {
if err := s.btcNotifier.Stop(); err != nil {
log.Error().Err(err).Msg("failed to stop btc chain notifier")
}
}()

// Start pollers
go s.startExpiryPoller(ctx)
Expand Down
18 changes: 0 additions & 18 deletions internal/types/global_params.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package types

import (
"encoding/hex"
"encoding/json"
"os"
"path/filepath"

"github.com/babylonlabs-io/networks/parameters/parser"
"github.com/btcsuite/btcd/btcec/v2"
)

type VersionedGlobalParams = parser.VersionedGlobalParams
Expand All @@ -33,19 +31,3 @@ func NewGlobalParams(path string) (*GlobalParams, error) {

return &globalParams, nil
}

// parseCovenantPubKeyFromHex parses public key string to btc public key
// the input should be 33 bytes
func parseCovenantPubKeyFromHex(pkStr string) (*btcec.PublicKey, error) {
pkBytes, err := hex.DecodeString(pkStr)
if err != nil {
return nil, err
}

pk, err := btcec.ParsePubKey(pkBytes)
if err != nil {
return nil, err
}

return pk, nil
}

0 comments on commit 750ca47

Please sign in to comment.