From 89fe24bbcc2395b9fbd449f5aeb9da8df073991d Mon Sep 17 00:00:00 2001 From: ANOTHEL Date: Tue, 27 Nov 2018 21:00:57 +0900 Subject: [PATCH] p2p/discv5: minor code simplification (#18188) * Update net.go more simple * Update net.go --- p2p/discv5/net.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/p2p/discv5/net.go b/p2p/discv5/net.go index a6cabf080..976eae7df 100644 --- a/p2p/discv5/net.go +++ b/p2p/discv5/net.go @@ -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: