aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-09 12:29:49 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commitac8233b77d97c57612dd48578aa5633a7e1f6a69 (patch)
treec6b0c2000b2dac32df6c55b2f5504b47960de8d1 /dex
parent1d877a782b6416820fe8da016b8570ed632543af (diff)
downloaddexon-ac8233b77d97c57612dd48578aa5633a7e1f6a69.tar
dexon-ac8233b77d97c57612dd48578aa5633a7e1f6a69.tar.gz
dexon-ac8233b77d97c57612dd48578aa5633a7e1f6a69.tar.bz2
dexon-ac8233b77d97c57612dd48578aa5633a7e1f6a69.tar.lz
dexon-ac8233b77d97c57612dd48578aa5633a7e1f6a69.tar.xz
dexon-ac8233b77d97c57612dd48578aa5633a7e1f6a69.tar.zst
dexon-ac8233b77d97c57612dd48578aa5633a7e1f6a69.zip
core: vm: refactor and add DKGFinalizeds related implementations
Diffstat (limited to 'dex')
-rw-r--r--dex/governance.go13
-rw-r--r--dex/network.go4
2 files changed, 13 insertions, 4 deletions
diff --git a/dex/governance.go b/dex/governance.go
index 5ee307b88..e990f32f3 100644
--- a/dex/governance.go
+++ b/dex/governance.go
@@ -35,7 +35,7 @@ func (d *DexconGovernance) NodeSet(round uint64) []crypto.PublicKey {
}
// AddDKGComplaint adds a DKGComplaint.
-func (d *DexconGovernance) AddDKGComplaint(complaint *types.DKGComplaint) {
+func (d *DexconGovernance) AddDKGComplaint(round uint64, complaint *types.DKGComplaint) {
}
// DKGComplaints gets all the DKGComplaints of round.
@@ -44,10 +44,19 @@ func (d *DexconGovernance) DKGComplaints(round uint64) []*types.DKGComplaint {
}
// AddDKGMasterPublicKey adds a DKGMasterPublicKey.
-func (d *DexconGovernance) AddDKGMasterPublicKey(masterPublicKey *types.DKGMasterPublicKey) {
+func (d *DexconGovernance) AddDKGMasterPublicKey(round uint64, masterPublicKey *types.DKGMasterPublicKey) {
}
// DKGMasterPublicKeys gets all the DKGMasterPublicKey of round.
func (d *DexconGovernance) DKGMasterPublicKeys(round uint64) []*types.DKGMasterPublicKey {
return nil
}
+
+// AddDKGFinalize adds a DKG finalize message.
+func (d *DexconGovernance) AddDKGFinalize(round uint64, final *types.DKGFinalize) {
+}
+
+// IsDKGFinal checks if DKG is final.
+func (d *DexconGovernance) IsDKGFinal(round uint64) bool {
+ return false
+}
diff --git a/dex/network.go b/dex/network.go
index b19b46147..24ef2cc63 100644
--- a/dex/network.go
+++ b/dex/network.go
@@ -39,8 +39,8 @@ func (n *DexconNetwork) BroadcastDKGPartialSignature(
psig *types.DKGPartialSignature) {
}
-// BroadcastRandomnessRequest broadcasts rand request to DKG set.
-func (n *DexconNetwork) BroadcastRandomnessRequest(randRequest *types.AgreementResult) {
+// BroadcastAgreementResult broadcasts rand request to DKG set.
+func (n *DexconNetwork) BroadcastAgreementResult(randRequest *types.AgreementResult) {
}