diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2019-05-15 23:11:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-15 23:11:17 +0800 |
commit | b548b5aeb00dd51f4f2d982f60d9dec5af8615e8 (patch) | |
tree | 6d331d86a90659b9b0d474ecb9465edb4f52bccb | |
parent | 4b9c3bd39a3df06600339ec4b06060cce30b6042 (diff) | |
download | go-tangerine-b548b5aeb00dd51f4f2d982f60d9dec5af8615e8.tar go-tangerine-b548b5aeb00dd51f4f2d982f60d9dec5af8615e8.tar.gz go-tangerine-b548b5aeb00dd51f4f2d982f60d9dec5af8615e8.tar.bz2 go-tangerine-b548b5aeb00dd51f4f2d982f60d9dec5af8615e8.tar.lz go-tangerine-b548b5aeb00dd51f4f2d982f60d9dec5af8615e8.tar.xz go-tangerine-b548b5aeb00dd51f4f2d982f60d9dec5af8615e8.tar.zst go-tangerine-b548b5aeb00dd51f4f2d982f60d9dec5af8615e8.zip |
p2p/discover: fix crash in Resolve (#19579)
-rw-r--r-- | p2p/discover/v4_udp.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/p2p/discover/v4_udp.go b/p2p/discover/v4_udp.go index b0b0053a7..b3569b671 100644 --- a/p2p/discover/v4_udp.go +++ b/p2p/discover/v4_udp.go @@ -426,11 +426,11 @@ func (t *UDPv4) Resolve(n *enode.Node) *enode.Node { } } // Otherwise perform a network lookup. - var key *enode.Secp256k1 - if n.Load(key) != nil { + var key enode.Secp256k1 + if n.Load(&key) != nil { return n // no secp256k1 key } - result := t.LookupPubkey((*ecdsa.PublicKey)(key)) + result := t.LookupPubkey((*ecdsa.PublicKey)(&key)) for _, rn := range result { if rn.ID() == n.ID() { if rn, err := t.requestENR(rn); err == nil { |