From 2b2396b6bce0f21b515ac2d38556f6dca08b1770 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Wed, 27 Feb 2019 10:41:01 +0800 Subject: core: sync to latest core (#214) * vendor: sync to latest core * fix for single chain --- dex/governance.go | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'dex/governance.go') 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) + } +} -- cgit