diff --git a/chain/sync.go b/chain/sync.go index b65341825..0015462bd 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -513,6 +513,10 @@ func (syncer *Syncer) ValidateBlock(ctx context.Context, b *types.FullBlock) err snum := types.BigDiv(mpow, types.NewInt(ssize)) + if len(h.EPostProof.Candidates) == 0 { + return xerrors.Errorf("no candidates") + } + for _, t := range h.EPostProof.Candidates { if !types.IsTicketWinner(t.Partial, ssize, snum.Uint64(), tpow) { return xerrors.Errorf("miner created a block but was not a winner")