p2p/discv5: minor code simplification (#18188)
* Update net.go more simple * Update net.go
This commit is contained in:
parent
8b9f469419
commit
89fe24bbcc
@ -567,12 +567,11 @@ loop:
|
|||||||
net.ticketStore.searchLookupDone(res.target, res.nodes, func(n *Node, topic Topic) []byte {
|
net.ticketStore.searchLookupDone(res.target, res.nodes, func(n *Node, topic Topic) []byte {
|
||||||
if n.state != nil && n.state.canQuery {
|
if n.state != nil && n.state.canQuery {
|
||||||
return net.conn.send(n, topicQueryPacket, topicQuery{Topic: topic}) // TODO: set expiration
|
return net.conn.send(n, topicQueryPacket, topicQuery{Topic: topic}) // TODO: set expiration
|
||||||
} else {
|
|
||||||
if n.state == unknown {
|
|
||||||
net.ping(n, n.addr())
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
if n.state == unknown {
|
||||||
|
net.ping(n, n.addr())
|
||||||
|
}
|
||||||
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
case <-statsDump.C:
|
case <-statsDump.C:
|
||||||
|
Loading…
Reference in New Issue
Block a user