Check for nil returns from StateSectorGetInfo

This commit is contained in:
Geoff Stuart
2022-12-12 10:44:08 -05:00
parent 33a176eae4
commit f95e6602a0
22 changed files with 29 additions and 0 deletions
+1
View File
@@ -1046,6 +1046,7 @@ func (a *StateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.A
return pci, err
}
// Returns nil, nil if sector is not found
func (m *StateModule) StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error) {
ts, err := m.Chain.GetTipSetFromKey(ctx, tsk)
if err != nil {