summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorirdan <daniel1555@gmail.com>2014-10-26 14:03:27 -0700
committerirdan <daniel1555@gmail.com>2014-10-26 14:03:27 -0700
commit7836ced3f8bd5e994d5bd20705661a759243ea09 (patch)
tree7ff34941b3ea4438fc0e4b6a4a34dada268481df /docs
parent9c480acecf1029fbba916a3f56ca902b9272e24b (diff)
Modify DHT.md to render correctly
Diffstat (limited to 'docs')
-rw-r--r--docs/updates/DHT.md56
1 files changed, 28 insertions, 28 deletions
diff --git a/docs/updates/DHT.md b/docs/updates/DHT.md
index 17db70ce..86fad3d1 100644
--- a/docs/updates/DHT.md
+++ b/docs/updates/DHT.md
@@ -36,39 +36,39 @@ Send a get nodes request every 20 seconds to a random good node in the client li
36 36
37When a client receives any request from another 37When a client receives any request from another
38----------------------------------------------- 38-----------------------------------------------
39-Respond to the request 39- Respond to the request
40 -Ping request is replied to with with a ping response containing the same encrypted data 40 - Ping request is replied to with with a ping response containing the same encrypted data
41 -Get nodes request is replied with a send nodes reply containing the same encrypted data and the good nodes from the client list and/or the "friends" list that are closest to the requested_node_id 41 - Get nodes request is replied with a send nodes reply containing the same encrypted data and the good nodes from the client list and/or the "friends" list that are closest to the requested_node_id
42 42
43-If the requesting client is not in the client list: 43- If the requesting client is not in the client list:
44 -If there are no bad clients in the list and the list is full: 44 - If there are no bad clients in the list and the list is full:
45 -If the id of the other client is closer (mathematically see bittorrent doc) than at least one of the clients in the list or our "friends" list: 45 - If the id of the other client is closer (mathematically see bittorrent doc) than at least one of the clients in the list or our "friends" list:
46 -Send a ping request to the client. 46 - Send a ping request to the client.
47 -if not forget about the client. 47 - if not forget about the client.
48 48
49 -If there are bad clients and/or the list isn't full: 49 - If there are bad clients and/or the list isn't full:
50 -Send a ping request to the client 50 - Send a ping request to the client
51 51
52When a client receives a response 52When a client receives a response
53--------------------------------- 53---------------------------------
54-Ping response 54- Ping response
55 -If the node was previously pinged with a matching ping_id (check in the corresponding pinged list.) 55 - If the node was previously pinged with a matching ping_id (check in the corresponding pinged list.)
56 -If the node is in the client list the matching client's timestamp is set to current time. 56 - If the node is in the client list the matching client's timestamp is set to current time.
57 -If the node is in the "friends" list the matching client's timestamp is set to current time for every occurrence. 57 - If the node is in the "friends" list the matching client's timestamp is set to current time for every occurrence.
58 -If the node is not in the client list: 58 - If the node is not in the client list:
59 -If the list isn't full, add it to the list. 59 - If the list isn't full, add it to the list.
60 -If the list is full, the furthest away (mathematically see bittorrent doc) bad client is replaced by the new one. 60 - If the list is full, the furthest away (mathematically see bittorrent doc) bad client is replaced by the new one.
61 -If the list is filled with good nodes replace the furthest client with it only if it is closer than the replaced node. 61 - If the list is filled with good nodes replace the furthest client with it only if it is closer than the replaced node.
62 -for each friend in the "friends" list: 62 - for each friend in the "friends" list:
63 -If that friend's client list isn't full, add that client to it 63 - If that friend's client list isn't full, add that client to it
64 -If that friend's client list contains bad clients, replace the furthest one with that client. 64 - If that friend's client list contains bad clients, replace the furthest one with that client.
65 -If that friend's client list contains only good clients 65 - If that friend's client list contains only good clients
66 -If the client is closer to the friend than one of the other clients, it replaces the farthest one 66 - If the client is closer to the friend than one of the other clients, it replaces the farthest one
67 -If not, nothing happens. 67 - If not, nothing happens.
68 68
69 -Send nodes 69 - Send nodes
70 -If the ping_id matches what we sent previously (check in the corresponding pinged list.): 70 - If the ping_id matches what we sent previously (check in the corresponding pinged list.):
71 -Each node in the response is pinged. 71 - Each node in the response is pinged.
72 72
73 73
74 74