go-ethereum/p2p
zhiqiangxu a9dfac0332
p2p/discover: improve nodesByDistance.push code ()
This improves readability of function 'push'.

sort.Search(N, ...) will at most return N when no match, so ix should be compared
with N. The previous version would compare ix with N+1 in case an additional item
was appended. No bug resulted from this comparison, but it's not easy to understand
why.

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-12-07 23:31:47 +01:00
..
discover p2p/discover: improve nodesByDistance.push code () 2022-12-07 23:31:47 +01:00
dnsdisc common/lru: add generic LRU implementation () 2022-11-14 15:41:56 +01:00
enode p2p/enode: implement per-source timeout in FairMix () 2022-11-08 12:12:36 +01:00
enr p2p/discover: improve discv5 NODES response packing () 2022-11-07 19:19:02 +01:00
msgrate all: fix spelling mistakes () 2022-10-11 09:37:00 +02:00
nat p2p/nat: handle responses with alternative port in NAT-PMP () 2022-12-07 16:22:04 +01:00
netutil p2p/netutil: minor code cosmetic 2022-07-25 12:52:49 +03:00
nodestate all: fix docstrings 2022-10-04 09:18:02 +02:00
rlpx all: update license headers and AUTHORS from git history () 2022-05-24 20:39:40 +02:00
simulations graphql, node, rpc: improve HTTP write timeout handling () 2022-12-07 14:02:14 +01:00
tracker all: fix some typos () 2022-08-19 09:00:21 +03:00
dial_test.go p2p: new dial scheduler () 2020-02-13 11:10:03 +01:00
dial.go build: upgrade to go 1.19 () 2022-09-10 13:25:40 +02:00
message_test.go p2p: move rlpx into separate package () 2020-09-22 10:17:39 +02:00
message.go build: upgrade to go 1.19 () 2022-09-10 13:25:40 +02:00
metrics.go eth/protocols, prp/tracker: add support for req/rep rtt tracking () 2021-04-22 11:42:46 +03:00
peer_error.go p2p: use errors.Is for error comparison () 2022-06-07 17:27:21 +02:00
peer_test.go p2p: move rlpx into separate package () 2020-09-22 10:17:39 +02:00
peer.go p2p: use errors.Is for error comparison () 2022-06-07 17:27:21 +02:00
protocol.go cmd/devp2p, p2p: dial using node iterator, discovery crawler () 2019-10-29 17:08:57 +02:00
server_test.go all: fix warning flagging the use of DeepEqual on error () 2021-10-19 17:06:47 +02:00
server.go cmd/geth, p2p: add support for custom discovery UDP port () 2022-06-28 17:25:47 +02:00
transport_test.go all: update license headers and AUTHORS from git history () 2022-05-24 20:39:40 +02:00
transport.go all: update license headers and AUTHORS from git history () 2022-05-24 20:39:40 +02:00
util_test.go p2p: new dial scheduler () 2020-02-13 11:10:03 +01:00
util.go all: assign zero after resize in implementations of heap.Interface () 2022-12-05 13:49:54 +01:00