Explorar o código

p2p/discv5: don't hash findnode target in lookup against table (#18309)

yahtoo %!s(int64=7) %!d(string=hai) anos
pai
achega
aad3c67a92
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      p2p/discv5/net.go

+ 1 - 1
p2p/discv5/net.go

@@ -800,7 +800,7 @@ func (n *nodeNetGuts) startNextQuery(net *Network) {
 func (q *findnodeQuery) start(net *Network) bool {
 	// Satisfy queries against the local node directly.
 	if q.remote == net.tab.self {
-		closest := net.tab.closest(crypto.Keccak256Hash(q.target[:]), bucketSize)
+		closest := net.tab.closest(q.target, bucketSize)
 		q.reply <- closest.entries
 		return true
 	}