aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils/utils.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-03-29 14:31:03 +0800
committerGitHub <noreply@github.com>2019-03-29 14:31:03 +0800
commit04a4df9479e31f1418760a389060706a72259381 (patch)
tree6f09bf2646ed87627f348a2c0f66e3465d7d231a /core/utils/utils.go
parente3e7f4fbd840819b1ef44ae2c345f64e0bb2c161 (diff)
downloadtangerine-consensus-04a4df9479e31f1418760a389060706a72259381.tar.gz
tangerine-consensus-04a4df9479e31f1418760a389060706a72259381.tar.zst
tangerine-consensus-04a4df9479e31f1418760a389060706a72259381.zip
core: reset DKG if to less qualified nodes (#528)
Diffstat (limited to 'core/utils/utils.go')
-rw-r--r--core/utils/utils.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/utils/utils.go b/core/utils/utils.go
index fcdf422..9a4ae92 100644
--- a/core/utils/utils.go
+++ b/core/utils/utils.go
@@ -139,6 +139,11 @@ func GetDKGThreshold(config *types.Config) int {
return int(config.NotarySetSize*2/3) + 1
}
+// GetDKGValidThreshold return threshold for DKG set to considered valid.
+func GetDKGValidThreshold(config *types.Config) int {
+ return int(config.NotarySetSize * 5 / 6)
+}
+
// GetNextRoundValidationHeight returns the block height to check if the next
// round is ready.
func GetNextRoundValidationHeight(begin, length uint64) uint64 {