diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-10-20 14:49:31 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:50 +0800 |
commit | 3fdfa4474ca257ef6e289c0a5c3b1c3e490d7e02 (patch) | |
tree | 7c22cfd3f033b2007b46bccc02647cbff00865fb /dex/handler.go | |
parent | 15613bf756a23095dd6e698c5973822df480ade3 (diff) | |
download | dexon-3fdfa4474ca257ef6e289c0a5c3b1c3e490d7e02.tar dexon-3fdfa4474ca257ef6e289c0a5c3b1c3e490d7e02.tar.gz dexon-3fdfa4474ca257ef6e289c0a5c3b1c3e490d7e02.tar.bz2 dexon-3fdfa4474ca257ef6e289c0a5c3b1c3e490d7e02.tar.lz dexon-3fdfa4474ca257ef6e289c0a5c3b1c3e490d7e02.tar.xz dexon-3fdfa4474ca257ef6e289c0a5c3b1c3e490d7e02.tar.zst dexon-3fdfa4474ca257ef6e289c0a5c3b1c3e490d7e02.zip |
dex: fix public key conversion
Diffstat (limited to 'dex/handler.go')
-rw-r--r-- | dex/handler.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/dex/handler.go b/dex/handler.go index 35d2901c9..e9ef91fd5 100644 --- a/dex/handler.go +++ b/dex/handler.go @@ -884,12 +884,8 @@ func (pm *ProtocolManager) BroadcastRandomnessResult( func (pm *ProtocolManager) SendDKGPrivateShare( pub coreCrypto.PublicKey, privateShare *coreTypes.DKGPrivateShare) { - uncompressedKey, err := crypto.DecompressPubkey(pub.Bytes()) - if err != nil { - log.Error("decompress key fail", "err", err) - } - id := discover.PubkeyID(uncompressedKey) - if p := pm.peers.Peer(id.String()); p != nil { + id := string(pub.Bytes()[1:]) + if p := pm.peers.Peer(id); p != nil { p.AsyncSendDKGPrivateShare(privateShare) } } |