diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-02-27 10:41:01 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:57 +0800 |
commit | e83bcc1097d49b46b79131e546f1270b9192cc05 (patch) | |
tree | a1af659afd80e3744177637cc06b2f0662a0ced8 /dex/governance.go | |
parent | 22b38ce74c3da40b7b7f24ada0abdf8d5ba03c64 (diff) | |
download | dexon-e83bcc1097d49b46b79131e546f1270b9192cc05.tar.gz dexon-e83bcc1097d49b46b79131e546f1270b9192cc05.tar.zst dexon-e83bcc1097d49b46b79131e546f1270b9192cc05.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.go | 21 |
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) + } +} |