aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-20 14:49:31 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:23:39 +0800
commitbd1f04e40e12c36af4df39450489c477c4f0fb06 (patch)
treecb010729dfa058846ed6985cb96cc4b7bac17229
parent4201cb7b80c672a72a7448d3de6e0264e2c69a4c (diff)
downloadgo-tangerine-bd1f04e40e12c36af4df39450489c477c4f0fb06.tar.gz
go-tangerine-bd1f04e40e12c36af4df39450489c477c4f0fb06.tar.zst
go-tangerine-bd1f04e40e12c36af4df39450489c477c4f0fb06.zip
dex: fix public key conversion
-rw-r--r--dex/handler.go8
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)
}
}