Skip to content

Commit

Permalink
p2p/discv5: minor code simplification (#18188)
Browse files Browse the repository at this point in the history
* Update net.go

more simple

* Update net.go
  • Loading branch information
anothel authored and karalabe committed Nov 27, 2018
1 parent 8b9f469 commit 89fe24b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions p2p/discv5/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,12 +567,11 @@ loop:
net.ticketStore.searchLookupDone(res.target, res.nodes, func(n *Node, topic Topic) []byte {
if n.state != nil && n.state.canQuery {
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:
Expand Down

0 comments on commit 89fe24b

Please sign in to comment.