diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-04-15 18:19:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-15 18:19:46 +0800 |
commit | 4a8d6480f7ab074bc032d68df6ee8df5876ef3cc (patch) | |
tree | 54fdb27d6254ecc56f27b7819e9e554c2b1e9f63 /dex | |
parent | d77c1aa22cb6f2b76af3edf4995159b843838441 (diff) | |
download | go-tangerine-4a8d6480f7ab074bc032d68df6ee8df5876ef3cc.tar go-tangerine-4a8d6480f7ab074bc032d68df6ee8df5876ef3cc.tar.gz go-tangerine-4a8d6480f7ab074bc032d68df6ee8df5876ef3cc.tar.bz2 go-tangerine-4a8d6480f7ab074bc032d68df6ee8df5876ef3cc.tar.lz go-tangerine-4a8d6480f7ab074bc032d68df6ee8df5876ef3cc.tar.xz go-tangerine-4a8d6480f7ab074bc032d68df6ee8df5876ef3cc.tar.zst go-tangerine-4a8d6480f7ab074bc032d68df6ee8df5876ef3cc.zip |
core: implement DKG success (#362)
* vendor: sync to latest core
* core: implmenet dkg success
* cmd: govtool: add DKGSuccess
Diffstat (limited to 'dex')
-rw-r--r-- | dex/governance.go | 14 |
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) |