Skip to content

Commit 0675791

Browse files
committed
discv5: improve FINDNODE, NODES text
1 parent e858700 commit 0675791

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

discv5/discv5-wire.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ PONG is the reply to PING.
165165

166166
message-data = [request-id, distance₁, distance₂, ..., distanceₙ]
167167
message-type = 0x03
168-
distance = the requested log2 distance, a positive integer
168+
distanceₙ = requested log2 distance, a positive integer
169169

170170
FINDNODE queries for nodes at the given logarithmic distances from the recipient's node ID.
171171
The recipient should create a result set containing nodes from its local node table.
172172

173-
A request with distance `0` should return the recipient's current record as the result.
173+
A request with distance `0` should return the recipient's current record as the only result.
174174

175175
### NODES Response (0x04)
176176

@@ -181,6 +181,9 @@ A request with distance `0` should return the recipient's current record as the
181181
NODES is the response to a FINDNODE or TOPICQUERY message. Multiple NODES messages may be
182182
sent as responses to a single query.
183183

184+
When handling NODES as a response to FINDNODE, the recipient should verify that the
185+
received nodes match the requested distances.
186+
184187
### TALKREQ Request (0x05)
185188

186189
message-data = [request-id, protocol, request]

0 commit comments

Comments
 (0)