fix: storage: don't panic in getCommitCutoff when precommit is not found

This commit is contained in:
Łukasz Magiera 2022-08-09 11:44:40 +02:00
parent 0c91b0dc10
commit ca1ff19541

View File

@ -573,6 +573,9 @@ func (b *CommitBatcher) getCommitCutoff(si SectorInfo) (time.Time, error) {
log.Errorf("getting precommit info: %s", err)
return time.Now(), err
}
if pci == nil {
return time.Now(), xerrors.Errorf("precommit info not found")
}
av, err := actors.VersionForNetwork(nv)
if err != nil {
log.Errorf("unsupported network vrsion: %s", err)