fix(chainwatch): Remove useless logging

This commit is contained in:
Mike Greenberg 2020-08-31 22:32:34 -04:00
parent 80ed6b8c25
commit 95a75daf9f
2 changed files with 9 additions and 3 deletions

View File

@ -369,7 +369,9 @@ where rnk <= $1
maxBlock = bh.Height
}
}
log.Infow("Gathered Blocks to Process", "start", minBlock, "end", maxBlock)
if minBlock <= maxBlock {
log.Infow("Gathered Blocks to Process", "start", minBlock, "end", maxBlock)
}
return out, rows.Close()
}

View File

@ -167,12 +167,16 @@ func (s *Syncer) Start(ctx context.Context) {
}
// we need to ensure that on a restart we don't reprocess the whole flarping chain
var sinceEpoch uint64
blkCID, height, err := s.mostRecentlySyncedBlockHeight()
if err != nil {
log.Fatalw("failed to find most recently synced block", "error", err)
} else {
if height > 0 {
log.Infow("Found starting point for syncing", "blockCID", blkCID.String(), "height", height)
sinceEpoch = uint64(height)
}
}
log.Infow("Found starting point for syncing", "blockCID", blkCID.String(), "height", height)
sinceEpoch := uint64(height)
go func() {
for notif := range notifs {
for _, change := range notif {