aboutsummaryrefslogtreecommitdiffstats
path: root/dex/governance.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-02-27 10:41:01 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:22 +0800
commit2b2396b6bce0f21b515ac2d38556f6dca08b1770 (patch)
tree60d6c93689b54534ecc88bd1491bd82fa372b541 /dex/governance.go
parentedb1273cb08d56df41b30b1f2f2e113f9b4296e4 (diff)
downloadgo-tangerine-2b2396b6bce0f21b515ac2d38556f6dca08b1770.tar
go-tangerine-2b2396b6bce0f21b515ac2d38556f6dca08b1770.tar.gz
go-tangerine-2b2396b6bce0f21b515ac2d38556f6dca08b1770.tar.bz2
go-tangerine-2b2396b6bce0f21b515ac2d38556f6dca08b1770.tar.lz
go-tangerine-2b2396b6bce0f21b515ac2d38556f6dca08b1770.tar.xz
go-tangerine-2b2396b6bce0f21b515ac2d38556f6dca08b1770.tar.zst
go-tangerine-2b2396b6bce0f21b515ac2d38556f6dca08b1770.zip
core: sync to latest core (#214)
* vendor: sync to latest core * fix for single chain
Diffstat (limited to 'dex/governance.go')
-rw-r--r--dex/governance.go21
1 files changed, 15 insertions, 6 deletions
diff --git a/dex/governance.go b/dex/governance.go
index 8b20cda19..56d08975e 100644
--- a/dex/governance.go
+++ b/dex/governance.go
@@ -229,12 +229,8 @@ func (d *DexconGovernance) ReportForkBlock(block1, block2 *coreTypes.Block) {
}
}
-func (d *DexconGovernance) GetNumChains(round uint64) uint32 {
- return 1
-}
-
-func (d *DexconGovernance) NotarySet(round uint64, chainID uint32) (map[string]struct{}, error) {
- notarySet, err := d.nodeSetCache.GetNotarySet(round, chainID)
+func (d *DexconGovernance) NotarySet(round uint64) (map[string]struct{}, error) {
+ notarySet, err := d.nodeSetCache.GetNotarySet(round)
if err != nil {
return nil, err
}
@@ -262,3 +258,16 @@ func (d *DexconGovernance) DKGSet(round uint64) (map[string]struct{}, error) {
}
return r, nil
}
+
+func (d *DexconGovernance) ResetDKG(newSignedCRS []byte) {
+ data, err := vm.PackResetDKG(newSignedCRS)
+ if err != nil {
+ log.Error("failed to pack resetDKG input", "err", err)
+ return
+ }
+
+ err = d.sendGovTx(context.Background(), data)
+ if err != nil {
+ log.Error("failed to send resetDKG tx", "err", err)
+ }
+}