diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-12-12 10:08:01 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | 36860ece33daa650bb58efe1a6a717ba6955044f (patch) | |
tree | f0d5ded60c2953bb0ec2fece8dd08e8a1d51b845 /core/governance.go | |
parent | 4c31b498bcc0db8926ad2610afa4533fc20ef737 (diff) | |
download | dexon-36860ece33daa650bb58efe1a6a717ba6955044f.tar dexon-36860ece33daa650bb58efe1a6a717ba6955044f.tar.gz dexon-36860ece33daa650bb58efe1a6a717ba6955044f.tar.bz2 dexon-36860ece33daa650bb58efe1a6a717ba6955044f.tar.lz dexon-36860ece33daa650bb58efe1a6a717ba6955044f.tar.xz dexon-36860ece33daa650bb58efe1a6a717ba6955044f.tar.zst dexon-36860ece33daa650bb58efe1a6a717ba6955044f.zip |
core: governance interface should return correct DKG master public keys (#85)
Diffstat (limited to 'core/governance.go')
-rw-r--r-- | core/governance.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/core/governance.go b/core/governance.go index 4b625c0fa..ea0036a0e 100644 --- a/core/governance.go +++ b/core/governance.go @@ -118,15 +118,7 @@ func (g *Governance) DKGComplaints(round uint64) []*dkgTypes.Complaint { func (g *Governance) DKGMasterPublicKeys(round uint64) []*dkgTypes.MasterPublicKey { headHelper := g.GetHeadHelper() - var dkgMasterPKs []*dkgTypes.MasterPublicKey - for _, pk := range headHelper.DKGMasterPublicKeys(big.NewInt(int64(round))) { - x := new(dkgTypes.MasterPublicKey) - if err := rlp.DecodeBytes(pk, x); err != nil { - panic(err) - } - dkgMasterPKs = append(dkgMasterPKs, x) - } - return dkgMasterPKs + return headHelper.UniqueDKGMasterPublicKeys(big.NewInt(int64(round))) } func (g *Governance) IsDKGFinal(round uint64) bool { |