diff --git a/blockstore/splitstore/splitstore_warmup.go b/blockstore/splitstore/splitstore_warmup.go index 039cb1a467a..b3c932224f6 100644 --- a/blockstore/splitstore/splitstore_warmup.go +++ b/blockstore/splitstore/splitstore_warmup.go @@ -49,8 +49,11 @@ func (s *SplitStore) warmup(curTs *types.TipSet) error { // and headers all the way up to genesis. // objects are written in batches so as to minimize overhead. func (s *SplitStore) doWarmup(curTs *types.TipSet) error { + var boundaryEpoch abi.ChainEpoch epoch := curTs.Height() - boundaryEpoch := epoch - WarmupBoundary + if WarmupBoundary < epoch { + boundaryEpoch = epoch - WarmupBoundary + } batchHot := make([]blocks.Block, 0, batchSize) count := int64(0) xcount := int64(0)