Implement fork

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-12-12 14:16:47 +01:00
parent 344dd2ca5a
commit 1eed506728
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
2 changed files with 9 additions and 2 deletions

3
build/forks.go Normal file
View File

@ -0,0 +1,3 @@
package build
const ForkCCM = 1700

View File

@ -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) {