Merge pull request #9141 from filecoin-project/fix/getcommitcutoff-panic

fix: storage: don't panic in getCommitCutoff when precommit is not found
This commit is contained in:
Geoff Stuart 2022-08-09 13:03:22 -04:00 committed by GitHub
commit 533f1a6fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)