Skip to content

Commit bd17dac

Browse files
authored
discv4: fix definition of node k-bucket distances (#212)
1 parent ab79935 commit bd17dac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discv4.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ from the response.
3131
## Kademlia Table
3232

3333
Nodes in the Discovery Protocol keep information about other nodes in their neighborhood.
34-
Neighbor nodes are stored in a routing table consisting of 'k-buckets'. For each `0 ≤ i <
35-
256`, every node keeps a k-bucket for nodes of distance between `2i` and `2i+1` from
36-
itself.
34+
Neighbor nodes are stored in a routing table consisting of 'k-buckets'. For each `i` in
35+
`0 ≤ i < 256`, every node keeps a k-bucket of neighbors with distance
36+
`2^i ≤ distance < 2^(i+1)` from itself.
3737

3838
The Node Discovery Protocol uses `k = 16`, i.e. every k-bucket contains up to 16 node
3939
entries. The entries are sorted by time last seen — least-recently seen node at the head,

0 commit comments

Comments
 (0)