Skip to content

Commit

Permalink
chore(share/p2p/discovery): change debug logs to info due as they are…
Browse files Browse the repository at this point in the history
… infrequent
  • Loading branch information
renaynay committed Jun 11, 2024
1 parent edef750 commit 5eb83a3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nodebuilder/fraud/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (breaker *ServiceBreaker[S, H]) Stop(ctx context.Context) error {

if breaker.ctx.Err() != nil {
// short circuit if the service was already stopped
return nil
return nil //nolint:nilerr

Check failure on line 72 in nodebuilder/fraud/lifecycle.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

directive `//nolint:nilerr` is unused for linter "nilerr" (nolintlint)
}

breaker.sub.Cancel()
Expand Down
2 changes: 1 addition & 1 deletion nodebuilder/p2p/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/ipfs/go-datastore"
connmgri "github.com/libp2p/go-libp2p/core/connmgr"
"github.com/libp2p/go-libp2p/core/peerstore"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds" //nolint:staticcheck
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds" //nolint:staticcheck //nolint:nolintlint
"github.com/libp2p/go-libp2p/p2p/net/conngater"
"github.com/libp2p/go-libp2p/p2p/net/connmgr"

Expand Down
1 change: 0 additions & 1 deletion share/eds/cache/noop.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ var _ Accessor = (*NoopAccessor)(nil)
type NoopAccessor struct{}

func (n NoopAccessor) Blockstore() (dagstore.ReadBlockstore, error) {
//nolint:nilnil
return nil, nil

Check failure on line 41 in share/eds/cache/noop.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

return both the `nil` error and invalid value: use a sentinel error instead (nilnil)
}

Expand Down
4 changes: 2 additions & 2 deletions share/p2p/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (d *Discovery) Advertise(ctx context.Context) {
timer := time.NewTimer(d.params.AdvertiseInterval)
defer timer.Stop()
for {
log.Debugf("advertising to topic %s", d.tag)
log.Infof("advertising to topic %s", d.tag)
_, err := d.disc.Advertise(ctx, d.tag)
d.metrics.observeAdvertise(ctx, err)
if err != nil {
Expand All @@ -195,7 +195,7 @@ func (d *Discovery) Advertise(ctx context.Context) {
}
}

log.Debugf("successfully advertised to topic %s", d.tag)
log.Infof("successfully advertised to topic %s", d.tag)
if !timer.Stop() {
<-timer.C
}
Expand Down

0 comments on commit 5eb83a3

Please sign in to comment.