aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/dkg.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-10-09 10:04:28 +0800
committerGitHub <noreply@github.com>2018-10-09 10:04:28 +0800
commit9267d50de25ddf0f280eee797e2030ea989294e4 (patch)
treee6345f8b2f04d360a12d7272bf17b137a13eec93 /core/types/dkg.go
parent8944f1ea16c531cbccc3f01d91854e942e040871 (diff)
downloaddexon-consensus-9267d50de25ddf0f280eee797e2030ea989294e4.tar
dexon-consensus-9267d50de25ddf0f280eee797e2030ea989294e4.tar.gz
dexon-consensus-9267d50de25ddf0f280eee797e2030ea989294e4.tar.bz2
dexon-consensus-9267d50de25ddf0f280eee797e2030ea989294e4.tar.lz
dexon-consensus-9267d50de25ddf0f280eee797e2030ea989294e4.tar.xz
dexon-consensus-9267d50de25ddf0f280eee797e2030ea989294e4.tar.zst
dexon-consensus-9267d50de25ddf0f280eee797e2030ea989294e4.zip
core: Add DKG final message. (#181)
Diffstat (limited to 'core/types/dkg.go')
-rw-r--r--core/types/dkg.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/types/dkg.go b/core/types/dkg.go
index a4c6bf1..c761504 100644
--- a/core/types/dkg.go
+++ b/core/types/dkg.go
@@ -69,13 +69,20 @@ type DKGComplaint struct {
// DKGPartialSignature describe a partial signature in DKG protocol.
type DKGPartialSignature struct {
- ProposerID NodeID `json:"proposerID"`
+ ProposerID NodeID `json:"proposer_id"`
Round uint64 `json:"round"`
Hash common.Hash `json:"hash"`
PartialSignature dkg.PartialSignature `json:"partial_signature"`
Signature crypto.Signature `json:"signature"`
}
+// DKGFinalize describe a dig finalize message in DKG protocol.
+type DKGFinalize struct {
+ ProposerID NodeID `json:"proposer_id"`
+ Round uint64 `json:"round"`
+ Signature crypto.Signature `json:"signature"`
+}
+
// IsNack returns true if it's a nack complaint in DKG protocol.
func (c *DKGComplaint) IsNack() bool {
return len(c.PrivateShare.Signature.Signature) == 0