aboutsummaryrefslogtreecommitdiffstats
path: root/dex/governance.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-04-15 18:19:46 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-15 22:09:55 +0800
commit073064170c874bb19741108d0833b1bf019b439b (patch)
tree74de9ac95ea36614fe1740a07c4466556582346f /dex/governance.go
parent2f4bfc149062715b712ce6729f2ba100284d9af5 (diff)
downloadgo-tangerine-073064170c874bb19741108d0833b1bf019b439b.tar
go-tangerine-073064170c874bb19741108d0833b1bf019b439b.tar.gz
go-tangerine-073064170c874bb19741108d0833b1bf019b439b.tar.bz2
go-tangerine-073064170c874bb19741108d0833b1bf019b439b.tar.lz
go-tangerine-073064170c874bb19741108d0833b1bf019b439b.tar.xz
go-tangerine-073064170c874bb19741108d0833b1bf019b439b.tar.zst
go-tangerine-073064170c874bb19741108d0833b1bf019b439b.zip
core: implement DKG success (#362)
* vendor: sync to latest core * core: implmenet dkg success * cmd: govtool: add DKGSuccess
Diffstat (limited to 'dex/governance.go')
-rw-r--r--dex/governance.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/dex/governance.go b/dex/governance.go
index b8dcf1589..ec09969b0 100644
--- a/dex/governance.go
+++ b/dex/governance.go
@@ -177,6 +177,20 @@ func (d *DexconGovernance) AddDKGFinalize(final *dkgTypes.Finalize) {
}
}
+// AddDKGSuccess adds a DKG success message.
+func (d *DexconGovernance) AddDKGSuccess(success *dkgTypes.Success) {
+ data, err := vm.PackAddDKGSuccess(success)
+ if err != nil {
+ log.Error("Failed to pack addDKGSuccess input", "err", err)
+ return
+ }
+
+ err = d.sendGovTx(context.Background(), data)
+ if err != nil {
+ log.Error("Failed to send addDKGSuccess tx", "err", err)
+ }
+}
+
// ReportForkVote reports a node for forking votes.
func (d *DexconGovernance) ReportForkVote(vote1, vote2 *coreTypes.Vote) {
data, err := vm.PackReportForkVote(vote1, vote2)