Skip to content

Commit 906da55

Browse files
committed
make linter happier
1 parent 72cc2ff commit 906da55

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Diff for: BITSWAP.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ Bitswap is a data exchange protocol for sending and receiving content addressed
2727

2828
## Introduction
2929

30-
Bitswap is a message-based protocol, as opposed to request-response. All messages contain wantlists, and/or blocks. Upon receiving a wantlist, a Bitswap server should eventually process and respond to the requester with either information about the block or the block itself. Upon receiving blocks, the client should send a `Cancel` notification to peers that have asked for the data, signifying that the client no longer wants the block.
30+
Bitswap is a message-based protocol, as opposed to request-response. All messages contain wantlists, and/or blocks.
31+
Upon receiving a wantlist, a Bitswap server should eventually process and respond to the requester with either information about the block or the block itself.
32+
Upon receiving blocks, the client should send a `Cancel` notification to peers that have asked for the data, signifying that the client no longer wants the block.
3133

3234
Bitswap aims to be a simple protocol, so that implementations can balance aspects such as throughput, latency, fairness, memory usage, etc. for their specific requirements.
3335

@@ -53,7 +55,7 @@ Given that a client C wants to fetch data from some server S:
5355
1. C may either send a complete wantlist, or an update to an outstanding wantlist
5456
2. C may reuse this stream to send new wants
5557
2. S sends back blocks on a stream `s_receive`. S may reuse this stream to send back subsequent responses.
56-
1. S should respect the relative priority of wantlist requests from C, with wants that have higher `priority` values being responded to first.
58+
1. S should respect the relative priority of wantlist requests from C, with wants that have higher `priority` values being responded to first.
5759
3. When C no longer needs a block it previously asked for, it should send a `Cancel` message for that block to all peers from which it has not received a response about that block
5860

5961
### Bitswap 1.0.0: Message
@@ -88,7 +90,7 @@ message Message {
8890

8991
All protocol messages sent over a stream are prefixed with the message length in
9092
bytes, encoded as an unsigned variable length integer as defined by the
91-
[multiformats unsigned-varint spec][uvarint-spec].
93+
[multiformats unsigned-varint spec](https://github.com/multiformats/unsigned-varint).
9294

9395
All protocol messages must be less than or equal to 4MiB in size
9496

@@ -108,11 +110,11 @@ It is otherwise identical to 1.0.0
108110
message Message {
109111
message Entry {
110112
bytes block = 1; // CID of the block
111-
int32 priority = 2; // the priority (normalized). default to 1
113+
int32 priority = 2; // the priority (normalized). default to 1
112114
bool cancel = 3; // whether this revokes an entry
113115
}
114116
115-
repeated Entry entries = 1; // a list of wantlist entries
117+
repeated Entry entries = 1; // a list of wantlist entries
116118
bool full = 2; // whether this is the full wantlist. default to false
117119
}
118120
@@ -160,13 +162,13 @@ message Message {
160162
161163
message Entry {
162164
bytes block = 1; // CID of the block
163-
int32 priority = 2; // the priority (normalized). default to 1
165+
int32 priority = 2; // the priority (normalized). default to 1
164166
bool cancel = 3; // whether this revokes an entry
165167
WantType wantType = 4; // Note: defaults to enum 0, ie Block
166168
bool sendDontHave = 5; // Note: defaults to false
167169
}
168170
169-
repeated Entry entries = 1; // a list of wantlist entries
171+
repeated Entry entries = 1; // a list of wantlist entries
170172
bool full = 2; // whether this is the full wantlist. default to false
171173
}
172174
message Block {

0 commit comments

Comments
 (0)