wait for the sync gap time befor starting the purge

This commit is contained in:
vyzo 2022-02-01 10:46:42 +02:00
parent 11ae85645b
commit fd07ca87ce

View File

@ -660,6 +660,10 @@ func (s *SplitStore) doCompact(curTs *types.TipSet) error {
return err
}
// wait for the head to catch up so that all messages are protected
log.Infof("waiting %s for sync", SyncGapTime)
time.Sleep(SyncGapTime)
checkpoint, err := NewCheckpoint(s.checkpointPath())
if err != nil {
return xerrors.Errorf("error creating checkpoint: %w", err)