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