From 1eed506728ed3ec2d02f4e475d25c65f6e38aff8 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 12 Dec 2019 14:16:47 +0100 Subject: [PATCH] Implement fork License: MIT Signed-off-by: Jakub Sztandera --- build/forks.go | 3 +++ chain/sync.go | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 build/forks.go diff --git a/build/forks.go b/build/forks.go new file mode 100644 index 000000000..2aa1e8509 --- /dev/null +++ b/build/forks.go @@ -0,0 +1,3 @@ +package build + +const ForkCCM = 1700 diff --git a/chain/sync.go b/chain/sync.go index 0015462bd..22f39eb8c 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -513,9 +513,13 @@ 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") + // FORK START + if h.Height > build.ForkCCM { + if len(h.EPostProof.Candidates) == 0 { + return xerrors.Errorf("no candidates") + } } + // FORK END for _, t := range h.EPostProof.Candidates { if !types.IsTicketWinner(t.Partial, ssize, snum.Uint64(), tpow) {