aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-19 14:35:20 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commitb69f7b9987d0e373c34a1bf7bfd7fa93e1dc5b88 (patch)
treeea243290f14acceb9cd106c0ddda14900ab50f15 /core
parent1a26392d20f4d3d3d7c7af6b6f04d8d7760b8036 (diff)
downloaddexon-b69f7b9987d0e373c34a1bf7bfd7fa93e1dc5b88.tar.gz
dexon-b69f7b9987d0e373c34a1bf7bfd7fa93e1dc5b88.tar.zst
dexon-b69f7b9987d0e373c34a1bf7bfd7fa93e1dc5b88.zip
dex: fix public key parsing due to changes in consensus core
Diffstat (limited to 'core')
-rw-r--r--core/vm/governance.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/vm/governance.go b/core/vm/governance.go
index a720e31f5..2e07ba3eb 100644
--- a/core/vm/governance.go
+++ b/core/vm/governance.go
@@ -1316,7 +1316,10 @@ func (g *GovernanceContract) inDKGSet(nodeID coreTypes.NodeID) bool {
ns := coreTypes.NewNodeSet()
for _, x := range g.state.Nodes() {
- mpk := ecdsa.NewPublicKeyFromByteSlice(x.PublicKey)
+ mpk, err := ecdsa.NewPublicKeyFromByteSlice(x.PublicKey)
+ if err != nil {
+ panic(err)
+ }
ns.Add(coreTypes.NewNodeID(mpk))
}