diff options
author | ANOTHEL <anothel1@naver.com> | 2018-11-27 20:00:57 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-11-27 20:00:57 +0800 |
commit | 89fe24bbcc2395b9fbd449f5aeb9da8df073991d (patch) | |
tree | 2679b70baa5041ef3ff13df43f0653b5a77f1d1d | |
parent | 8b9f46941924a04ce1091532a74def03e70c7559 (diff) | |
download | dexon-89fe24bbcc2395b9fbd449f5aeb9da8df073991d.tar.gz dexon-89fe24bbcc2395b9fbd449f5aeb9da8df073991d.tar.zst dexon-89fe24bbcc2395b9fbd449f5aeb9da8df073991d.zip |
p2p/discv5: minor code simplification (#18188)
* Update net.go
more simple
* Update net.go
-rw-r--r-- | p2p/discv5/net.go | 9 |
1 files 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: |