diff options
author | Mission Liao <mission.liao@dexon.org> | 2019-03-11 13:35:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-11 13:35:05 +0800 |
commit | c3bda77db1c2620c5212d4369792b923227d2570 (patch) | |
tree | 3f71c76926f8008ab3eabce3dfd147ebb683dafa /core/utils/utils.go | |
parent | 4345050093710739c9e417956bc3a8339e7d99a6 (diff) | |
download | tangerine-consensus-c3bda77db1c2620c5212d4369792b923227d2570.tar tangerine-consensus-c3bda77db1c2620c5212d4369792b923227d2570.tar.gz tangerine-consensus-c3bda77db1c2620c5212d4369792b923227d2570.tar.bz2 tangerine-consensus-c3bda77db1c2620c5212d4369792b923227d2570.tar.lz tangerine-consensus-c3bda77db1c2620c5212d4369792b923227d2570.tar.xz tangerine-consensus-c3bda77db1c2620c5212d4369792b923227d2570.tar.zst tangerine-consensus-c3bda77db1c2620c5212d4369792b923227d2570.zip |
core: move some dkg utils (#476)
* Move core.getDKGThreshold to
core.utils.GetDKGThreshold
* Move core.DKGGroupPublicKey to
typesDKG.GroupPublicKey
Diffstat (limited to 'core/utils/utils.go')
-rw-r--r-- | core/utils/utils.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/utils/utils.go b/core/utils/utils.go index 220240c..b8bd95e 100644 --- a/core/utils/utils.go +++ b/core/utils/utils.go @@ -133,3 +133,8 @@ func LaunchDummyReceiver( }() return dummyCancel, finishedChan } + +// GetDKGThreshold return expected threshold for given DKG set size. +func GetDKGThreshold(config *types.Config) int { + return int(config.DKGSetSize/3) + 1 +} |