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-04-09 21:32:50 +0800
commit7febfae8bba63f6b7e1326b22437dee38989c400 (patch)
treefc9610537d2f3be3776a1e1c3b5fc4849a8587e4 /core
parent17fb63161b6672c0e8101e5fde709b1b7ab2df23 (diff)
downloaddexon-7febfae8bba63f6b7e1326b22437dee38989c400.tar.gz
dexon-7febfae8bba63f6b7e1326b22437dee38989c400.tar.zst
dexon-7febfae8bba63f6b7e1326b22437dee38989c400.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))
}