From 9b199f0476869a8ece108061a07268a0f1d99eb9 Mon Sep 17 00:00:00 2001 From: leviok Date: Tue, 29 Sep 2020 09:37:47 +0800 Subject: [PATCH] fix nil pointer --- node/impl/full/state.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node/impl/full/state.go b/node/impl/full/state.go index 5e01eaa5b..fc1c6914c 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -792,6 +792,8 @@ func (a *StateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.A pci, err := stmgr.PreCommitInfo(ctx, a.StateManager, maddr, n, ts) if err != nil { return miner.SectorPreCommitOnChainInfo{}, err + } else if pci == nil { + return miner.SectorPreCommitOnChainInfo{}, nil } return *pci, err