aboutsummaryrefslogtreecommitdiffstats
path: root/core/types
diff options
context:
space:
mode:
Diffstat (limited to 'core/types')
-rw-r--r--core/types/dkg/dkg.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/types/dkg/dkg.go b/core/types/dkg/dkg.go
index f021d1b..efe8467 100644
--- a/core/types/dkg/dkg.go
+++ b/core/types/dkg/dkg.go
@@ -31,6 +31,11 @@ import (
"github.com/dexon-foundation/dexon-consensus/core/types"
)
+// NewID creates a DKGID from NodeID.
+func NewID(ID types.NodeID) cryptoDKG.ID {
+ return cryptoDKG.NewID(ID.Hash[:])
+}
+
// PrivateShare describe a secret share in DKG protocol.
type PrivateShare struct {
ProposerID types.NodeID `json:"proposer_id"`