Merge pull request #4082 from leviok/fix-nil-pointer
fix nil pointer in StateSectorPreCommitInfo
This commit is contained in:
commit
be2a5942fb
@ -792,6 +792,8 @@ func (a *StateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.A
|
|||||||
pci, err := stmgr.PreCommitInfo(ctx, a.StateManager, maddr, n, ts)
|
pci, err := stmgr.PreCommitInfo(ctx, a.StateManager, maddr, n, ts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return miner.SectorPreCommitOnChainInfo{}, err
|
return miner.SectorPreCommitOnChainInfo{}, err
|
||||||
|
} else if pci == nil {
|
||||||
|
return miner.SectorPreCommitOnChainInfo{}, xerrors.Errorf("precommit info is not exists")
|
||||||
}
|
}
|
||||||
|
|
||||||
return *pci, err
|
return *pci, err
|
||||||
|
Loading…
Reference in New Issue
Block a user