aboutsummaryrefslogtreecommitdiffstats
path: root/core/governance.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-12-12 10:08:01 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:19 +0800
commit1c1849aed3714f9148132016c554c1491592eb76 (patch)
tree81a9809424e33934c9d39d794b536f21c9e38e59 /core/governance.go
parent7b961be2852d89870f44e3f27c9ee13354b12032 (diff)
downloadgo-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.go10
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 {