From 7921f8d7137b5b5a26d0d8bbe61a507656d4f8ea Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Thu, 12 Nov 2020 11:25:22 -0800 Subject: [PATCH] drop a few logs down to debug --- chain/sync_manager.go | 4 ++-- node/hello/hello.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/chain/sync_manager.go b/chain/sync_manager.go index 808861950..3b1b54e51 100644 --- a/chain/sync_manager.go +++ b/chain/sync_manager.go @@ -194,7 +194,7 @@ func (sm *syncManager) scheduler() { } func (sm *syncManager) handlePeerHead(head peerHead) { - log.Infof("new peer head: %s %s", head.p, head.ts) + log.Debugf("new peer head: %s %s", head.p, head.ts) // have we started syncing yet? if sm.nextWorker == 0 { @@ -410,7 +410,7 @@ func (sm *syncManager) addSyncTarget(ts *types.TipSet) (*types.TipSet, bool, err // if we have not finished the initial sync or have too many workers, add it to the deferred queue; // it will be processed once a worker is freed from syncing a chain (or the initial sync finishes) if !sm.initialSyncDone || len(sm.state) >= MaxSyncWorkers { - log.Infof("deferring sync on %s", ts) + log.Debugf("deferring sync on %s", ts) sm.deferred.Insert(ts) return nil, false, nil } diff --git a/node/hello/hello.go b/node/hello/hello.go index 05d53de06..f269772be 100644 --- a/node/hello/hello.go +++ b/node/hello/hello.go @@ -161,7 +161,8 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error { _ = s.SetReadDeadline(build.Clock.Now().Add(10 * time.Second)) err := cborutil.ReadCborRPC(s, lmsg) if err != nil { - log.Infow("reading latency message", "error", err) + log.Debugw("reading latency message", "error", err) + // TODO: should we just return right here? } t3 := build.Clock.Now() @@ -177,7 +178,7 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error { t2 := time.Unix(0, lmsg.TSent) offset := t0.Sub(t1) + t3.Sub(t2) offset /= 2 - log.Infow("time offset", "offset", offset.Seconds(), "peerid", pid.String()) + log.Debugw("time offset", "offset", offset.Seconds(), "peerid", pid.String()) } } }()