From c3bda77db1c2620c5212d4369792b923227d2570 Mon Sep 17 00:00:00 2001 From: Mission Liao Date: Mon, 11 Mar 2019 13:35:05 +0800 Subject: core: move some dkg utils (#476) * Move core.getDKGThreshold to core.utils.GetDKGThreshold * Move core.DKGGroupPublicKey to typesDKG.GroupPublicKey --- core/utils/utils.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/utils/utils.go') 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 +} -- cgit