From d4b4c8a05e94f66c85e7b4238ae5947b26f13c40 Mon Sep 17 00:00:00 2001
From: Jimmy Hu <jimmy.hu@dexon.org>
Date: Mon, 4 Mar 2019 18:30:03 +0800
Subject: core: first few round will not have DKG (#455)

* core: Add DKGDelayRound constant

* core: use constant value

* core, utils: set DKGDelayRound for utils.

* test: add dkgDelayRound to state

* core: do not run dkg and crs for round < DKGDelayRound

* fix test
---
 core/utils/utils.go | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'core/utils/utils.go')

diff --git a/core/utils/utils.go b/core/utils/utils.go
index 8486d28..203f57f 100644
--- a/core/utils/utils.go
+++ b/core/utils/utils.go
@@ -26,6 +26,13 @@ import (
 	typesDKG "github.com/dexon-foundation/dexon-consensus/core/types/dkg"
 )
 
+var dkgDelayRound uint64
+
+// SetDKGDelayRound sets the variable.
+func SetDKGDelayRound(delay uint64) {
+	dkgDelayRound = delay
+}
+
 type configAccessor interface {
 	Configuration(round uint64) *types.Config
 }
-- 
cgit