chain: Reduce log noise

This commit is contained in:
Łukasz Magiera 2019-09-25 15:38:59 +02:00
parent 0299fa48f0
commit 76c5eca05a
2 changed files with 4 additions and 5 deletions

View File

@ -194,7 +194,7 @@ func (cs *ChainStore) PutTipSet(ts *FullTipSet) error {
if err != nil {
return xerrors.Errorf("errored while expanding tipset: %w", err)
}
fmt.Printf("expanded %s into %s\n", ts.TipSet().Cids(), expanded.Cids())
log.Debugf("expanded %s into %s\n", ts.TipSet().Cids(), expanded.Cids())
if err := cs.MaybeTakeHeavierTipSet(expanded); err != nil {
return errors.Wrap(err, "MaybeTakeHeavierTipSet failed in PutTipSet")
@ -223,7 +223,7 @@ func (cs *ChainStore) MaybeTakeHeavierTipSet(ts *types.TipSet) error {
log.Warn("no heaviest tipset found, using %s", ts.Cids())
}
log.Infof("New heaviest tipset! %s", ts.Cids())
log.Debugf("New heaviest tipset! %s", ts.Cids())
cs.heaviest = ts
if err := cs.writeHead(ts); err != nil {
@ -345,7 +345,7 @@ func (cs *ChainStore) addToTipSetTracker(b *types.BlockHeader) error {
tss := cs.tipsets[b.Height]
for _, oc := range tss {
if oc == b.Cid() {
log.Warn("tried to add block to tipset tracker that was already there")
log.Debug("tried to add block to tipset tracker that was already there")
return nil
}
}
@ -727,7 +727,6 @@ func (cs *ChainStore) GetRandomness(ctx context.Context, blks []cid.Cid, tickets
lt := int64(len(mtb.Tickets))
if nv < lt {
t := mtb.Tickets[lt-(1+nv)]
log.Infof("Returning randomness: H:%d, t:%d, mtb:%s", nts.Height(), lt-(1+nv), mtb.Cid())
return t.VDFResult, nil
}

View File

@ -560,7 +560,7 @@ loop:
func (syncer *Syncer) syncMessagesAndCheckState(headers []*types.TipSet) error {
return syncer.iterFullTipsets(headers, func(fts *store.FullTipSet) error {
log.Warnf("validating tipset (heigt=%d, size=%d)", fts.TipSet().Height(), len(fts.TipSet().Cids()))
log.Debugf("validating tipset (heigt=%d, size=%d)", fts.TipSet().Height(), len(fts.TipSet().Cids()))
if err := syncer.ValidateTipSet(context.TODO(), fts); err != nil {
log.Errorf("failed to validate tipset: %s", err)
return xerrors.Errorf("message processing failed: %w", err)