check for closing after the sync wait

This commit is contained in:
vyzo 2022-02-01 10:59:08 +02:00
parent 6353fa72d8
commit 578b5691bc

View File

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