Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-bitswap
Commits
21e1da33
Commit
21e1da33
authored
Mar 19, 2018
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: Fix a few typos
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
2cd0ce70
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
README.md
README.md
+2
-2
bitswap.go
bitswap.go
+1
-1
decision/ledger.go
decision/ledger.go
+1
-1
No files found.
README.md
View file @
21e1da33
...
...
@@ -4,7 +4,7 @@
Bitswap is the data trading module for ipfs, it manages requesting and sending
blocks to and from other peers in the network. Bitswap has two main jobs, the
first is to acquire blocks requested by the client from the network. The second
is to judiciously send blocks in its posession to other peers who want them.
is to judiciously send blocks in its pos
s
ession to other peers who want them.
Bitswap is a message based protocol, as opposed to response-reply. All messages
contain wantlists, or blocks. Upon receiving a wantlist, a node should consider
...
...
@@ -20,7 +20,7 @@ another peer has a task in the peer request queue created for it. The peer
request queue is a priority queue that sorts available tasks by some metric,
currently, that metric is very simple and aims to fairly address the tasks
of each other peer. More advanced decision logic will be implemented in the
future. Task workers pull tasks to be done off of the queue, retr
e
ive the block
future. Task workers pull tasks to be done off of the queue, retri
e
ve the block
to be sent, and send it off. The number of task workers is limited by a constant
factor.
...
...
bitswap.go
View file @
21e1da33
...
...
@@ -295,7 +295,7 @@ func (bs *Bitswap) CancelWants(cids []*cid.Cid, ses uint64) {
bs
.
wm
.
CancelWants
(
context
.
Background
(),
cids
,
nil
,
ses
)
}
// HasBlock announces the exist
a
nce of a block to this bitswap service. The
// HasBlock announces the exist
e
nce of a block to this bitswap service. The
// service will potentially notify its peers.
func
(
bs
*
Bitswap
)
HasBlock
(
blk
blocks
.
Block
)
error
{
return
bs
.
receiveBlockFrom
(
blk
,
""
)
...
...
decision/ledger.go
View file @
21e1da33
...
...
@@ -24,7 +24,7 @@ type ledger struct {
// Partner is the remote Peer.
Partner
peer
.
ID
// Accounting tracks bytes sent and rec
i
eved.
// Accounting tracks bytes sent and rece
i
ved.
Accounting
debtRatio
// lastExchange is the time of the last data exchange.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment