diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-10-20 14:49:31 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | fcebe9c222a5e6ab884366e3af690f8c7c792b7a (patch) | |
tree | 962f78a11cf520bc670de88244cb47006568b3dc /dex | |
parent | 92b9bb2f7934b584235ca22a0fba329e2631cccb (diff) | |
download | dexon-fcebe9c222a5e6ab884366e3af690f8c7c792b7a.tar dexon-fcebe9c222a5e6ab884366e3af690f8c7c792b7a.tar.gz dexon-fcebe9c222a5e6ab884366e3af690f8c7c792b7a.tar.bz2 dexon-fcebe9c222a5e6ab884366e3af690f8c7c792b7a.tar.lz dexon-fcebe9c222a5e6ab884366e3af690f8c7c792b7a.tar.xz dexon-fcebe9c222a5e6ab884366e3af690f8c7c792b7a.tar.zst dexon-fcebe9c222a5e6ab884366e3af690f8c7c792b7a.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) } } |