save the warm up epoch only if successful in warming up
This commit is contained in:
parent
9b6448518c
commit
421f05eab9
@ -492,13 +492,6 @@ func (s *SplitStore) warmup(curTs *types.TipSet) error {
|
|||||||
log.Infow("warm up done", "took", time.Since(start))
|
log.Infow("warm up done", "took", time.Since(start))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// save the warmup epoch
|
|
||||||
s.warmupEpoch = curTs.Height()
|
|
||||||
err = s.ds.Put(warmupEpochKey, epochToBytes(s.warmupEpoch))
|
|
||||||
if err != nil {
|
|
||||||
return xerrors.Errorf("error saving warm up epoch: %w")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -641,6 +634,13 @@ func (s *SplitStore) doWarmup(curTs *types.TipSet) error {
|
|||||||
log.Warnf("error saving mark set size: %s", err)
|
log.Warnf("error saving mark set size: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// save the warmup epoch
|
||||||
|
err = s.ds.Put(warmupEpochKey, epochToBytes(epoch))
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("error saving warm up epoch: %w", err)
|
||||||
|
}
|
||||||
|
s.warmupEpoch = epoch
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user