diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-04 18:30:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 18:30:03 +0800 |
commit | d4b4c8a05e94f66c85e7b4238ae5947b26f13c40 (patch) | |
tree | c2a10260820ac3a152506000aa03c41cd244d84f /core/utils/utils.go | |
parent | 603f8d6d999c1bb5b16c2f5dfc88f8bc9da7fc33 (diff) | |
download | tangerine-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar tangerine-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.gz tangerine-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.bz2 tangerine-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.lz tangerine-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.xz tangerine-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.zst tangerine-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.zip |
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
Diffstat (limited to 'core/utils/utils.go')
-rw-r--r-- | core/utils/utils.go | 7 |
1 files changed, 7 insertions, 0 deletions
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 } |