Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p2p/discover: fix handling of distance 256 in lookupDistances #26087

Merged
merged 4 commits into from
Nov 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename variable
  • Loading branch information
jtraglia committed Nov 1, 2022
commit 84cdc350894da4dc23924afe47509d7afc6abf0b
4 changes: 2 additions & 2 deletions p2p/discover/v5_udp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ func TestUDPv5_lookup(t *testing.T) {
test := newUDPV5Test(t)

// Ensure lookupDistances includes 256 when necessary.
node256 := nodesAtDistance(test.table.self().ID(), 255, 1)[0]
dists := lookupDistances(test.table.self().ID(), node256.ID())
node255 := nodesAtDistance(test.table.self().ID(), 255, 1)[0]
jtraglia marked this conversation as resolved.
Show resolved Hide resolved
dists := lookupDistances(test.table.self().ID(), node255.ID())
if !containsUint(256, dists) {
t.Errorf("lookup distances does not contain 256: %v", dists)
}
Expand Down