fix nil pointer
This commit is contained in:
parent
375b7a1c4c
commit
9b199f0476
@ -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{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return *pci, err
|
return *pci, err
|
||||||
|
Loading…
Reference in New Issue
Block a user