diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-12-12 10:08:01 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:19 +0800 |
commit | 1c1849aed3714f9148132016c554c1491592eb76 (patch) | |
tree | 81a9809424e33934c9d39d794b536f21c9e38e59 /core/governance.go | |
parent | 7b961be2852d89870f44e3f27c9ee13354b12032 (diff) | |
download | go-tangerine-1c1849aed3714f9148132016c554c1491592eb76.tar.gz go-tangerine-1c1849aed3714f9148132016c554c1491592eb76.tar.zst go-tangerine-1c1849aed3714f9148132016c554c1491592eb76.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 { |