Files
plugeth/p2p
zhiqiangxuandFelix Lange a9dfac0332 p2p/discover: improve nodesByDistance.push code (#26019)
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
..
2022-07-25 12:52:49 +03:00
2022-10-04 09:18:02 +02:00
2022-08-19 09:00:21 +03:00
2020-02-13 11:10:03 +01:00
2022-09-10 13:25:40 +02:00
2022-09-10 13:25:40 +02:00
2020-02-13 11:10:03 +01:00