clean up return code

This commit is contained in:
vyzo 2020-09-17 17:35:40 +03:00
parent d7948fcbcd
commit 2946561dec

View File

@ -1593,11 +1593,12 @@ func (syncer *Syncer) fetchMessages(ctx context.Context, headers []*types.TipSet
} }
wg.Wait() wg.Wait()
if batchErr == nil { if batchErr != nil {
dt := build.Clock.Since(start) return nil, batchErr
log.Infof("fetching messages for %d tipsets at %d done; took %s", batchSize, startOffset, dt)
} }
log.Infof("fetching messages for %d tipsets at %d done; took %s", batchSize, startOffset, build.Clock.Since(start))
return batch, batchErr return batch, batchErr
} }