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 13:49:54 +0800 |
commit | f26a871b6999440bd2107a1326ec30c41efc8be8 (patch) | |
tree | a0424c6d62876b210e9e34ec08a8a51cd1119f1a /dex | |
parent | ea672ae9c69a8dc46376d1ed7e46713354b405cd (diff) | |
download | dexon-f26a871b6999440bd2107a1326ec30c41efc8be8.tar dexon-f26a871b6999440bd2107a1326ec30c41efc8be8.tar.gz dexon-f26a871b6999440bd2107a1326ec30c41efc8be8.tar.bz2 dexon-f26a871b6999440bd2107a1326ec30c41efc8be8.tar.lz dexon-f26a871b6999440bd2107a1326ec30c41efc8be8.tar.xz dexon-f26a871b6999440bd2107a1326ec30c41efc8be8.tar.zst dexon-f26a871b6999440bd2107a1326ec30c41efc8be8.zip |
dex: fix public key conversion
Diffstat (limited to 'dex')
-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) } } |