You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BITSWAP.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,10 +215,10 @@ Given that a client C wants to fetch data from some server S:
215
215
1. If C sends S a Have request for data S has (and is willing to give to C) it should respond with a Have, although it may instead respond with the block itself (e.g. if the block is very small)
216
216
1. For each of the items that S sends back Blocks or BlockPresences for they may append any `tokens` they want
217
217
2. If C sends S a Have request for data S has but is not currently willing to give to C, S may respond with an `AuthRequired` BlockPresence
218
-
1. For each of the items that S sends back Blocks or BlockPresences for they may append any `tokens` they want. Recommended tokens include those that would inform C how they could convince S to give them access to the blocks they want.
219
-
2. If C sends S a Have request for data S does not have (or has but is not willing to tell C it has) and C has requested for DontHave responses then S should respond with DontHave
220
-
3. S may choose to include the number of bytes that are pending to be sent to C in the response message
221
-
4. If C asked for a block that S has but it is bigger than the maximum block size it should return `BlockTooBig`
218
+
1. For each of the items that S sends back Blocks or BlockPresences for they may append any `tokens` they want. Recommended tokens include those that would inform C how they could convince S to give them access to the blocks they want.
219
+
2. If C sends S a Have request for data S does not have (or has but is not willing to tell C it has) and C has requested for DontHave responses then S should respond with DontHave
220
+
3. S may choose to include the number of bytes that are pending to be sent to C in the response message
221
+
4. If C asked for a block that S has but it is bigger than the maximum block size it should return `BlockTooBig`
222
222
3. When C no longer needs a block it previously asked for it should send a Cancel message for that request to any peers that have not already responded about that particular block. It should particularly send Cancel messages for Block requests (as opposed to Have requests) that have not yet been answered.
223
223
224
224
### Tokens
@@ -245,14 +245,14 @@ message Message {
245
245
246
246
message Entry {
247
247
bytes block = 1; // CID of the block
248
-
int32 priority = 2;// the priority (normalized). default to 1
248
+
int32 priority = 2;// the priority (normalized). default to 1
0 commit comments