Merge pull request #936 from filecoin-project/feat/cleanup-logspam
clean up some log spam
This commit is contained in:
commit
f297409d6d
@ -90,7 +90,7 @@ func (bss *BlockSyncService) HandleStream(s inet.Stream) {
|
||||
|
||||
var req BlockSyncRequest
|
||||
if err := cborutil.ReadCborRPC(bufio.NewReader(s), &req); err != nil {
|
||||
log.Errorf("failed to read block sync request: %s", err)
|
||||
log.Warnf("failed to read block sync request: %s", err)
|
||||
return
|
||||
}
|
||||
log.Infof("block sync request for: %s %d", req.Start, req.RequestLength)
|
||||
@ -102,7 +102,7 @@ func (bss *BlockSyncService) HandleStream(s inet.Stream) {
|
||||
}
|
||||
|
||||
if err := cborutil.WriteCborRPC(s, resp); err != nil {
|
||||
log.Error("failed to write back response for handle stream: ", err)
|
||||
log.Warn("failed to write back response for handle stream: ", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,9 @@ func (bs *BlockSync) GetBlocks(ctx context.Context, tipset []cid.Cid, count int)
|
||||
res, err := bs.sendRequestToPeer(ctx, p, req)
|
||||
if err != nil {
|
||||
oerr = err
|
||||
log.Warnf("BlockSync request failed for peer %s: %s", p.String(), err)
|
||||
if !xerrors.Is(err, inet.ErrNoConn) {
|
||||
log.Warnf("BlockSync request failed for peer %s: %s", p.String(), err)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ func (c *Client) Start(ctx context.Context, p ClientDealProposal) (cid.Cid, erro
|
||||
func (c *Client) QueryAsk(ctx context.Context, p peer.ID, a address.Address) (*types.SignedStorageAsk, error) {
|
||||
s, err := c.h.NewStream(ctx, p, AskProtocolID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, xerrors.Errorf("failed to open stream to miner: %w", err)
|
||||
}
|
||||
|
||||
req := &AskRequest{
|
||||
|
@ -145,7 +145,7 @@ func (syncer *Syncer) InformNewHead(from peer.ID, fts *store.FullTipSet) {
|
||||
for _, blk := range fts.TipSet().Blocks() {
|
||||
miners = append(miners, blk.Miner.String())
|
||||
}
|
||||
log.Warnf("incoming tipset from %s does not appear to be better than our best chain, ignoring for now", miners)
|
||||
log.Infof("incoming tipset from %s does not appear to be better than our best chain, ignoring for now", miners)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -98,8 +98,11 @@ func (hs *Service) HandleStream(s inet.Stream) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Infof("Got new tipset through Hello: %s from %s", ts.Cids(), s.Conn().RemotePeer())
|
||||
hs.syncer.InformNewHead(s.Conn().RemotePeer(), ts)
|
||||
if ts.TipSet().Height() > 0 {
|
||||
// don't bother informing about genesis
|
||||
log.Infof("Got new tipset through Hello: %s from %s", ts.Cids(), s.Conn().RemotePeer())
|
||||
hs.syncer.InformNewHead(s.Conn().RemotePeer(), ts)
|
||||
}
|
||||
if hs.pmgr != nil {
|
||||
hs.pmgr.AddFilecoinPeer(s.Conn().RemotePeer())
|
||||
}
|
||||
@ -128,7 +131,7 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error {
|
||||
HeaviestTipSetWeight: weight,
|
||||
GenesisHash: gen.Cid(),
|
||||
}
|
||||
log.Info("Sending hello message: ", hts.Cids(), hts.Height(), gen.Cid())
|
||||
log.Debug("Sending hello message: ", hts.Cids(), hts.Height(), gen.Cid())
|
||||
|
||||
t0 := time.Now()
|
||||
if err := cborutil.WriteCborRPC(s, hmsg); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user