Don't return nil in StateSectorPreCommitInfo

This commit is contained in:
Łukasz Magiera 2020-11-23 12:14:49 +01:00 committed by GitHub
parent 9fe3649dd2
commit 7d540905ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -793,7 +793,7 @@ func (a *StateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.A
if err != nil {
return miner.SectorPreCommitOnChainInfo{}, err
} else if pci == nil {
return nil, xerrors.Errorf("precommit info is not exists")
return miner.SectorPreCommitOnChainInfo{}, xerrors.Errorf("precommit info is not exists")
}
return *pci, err