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
b00f22ec
Commit
b00f22ec
authored
Apr 20, 2018
by
Whyrusleeping
Committed by
GitHub
Apr 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4835 from ipfs/fix/typos
misc: Fix a few typos
parents
e60e1708
21e1da33
Changes
3
Show 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 @
b00f22ec
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
Bitswap is the data trading module for ipfs, it manages requesting and sending
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
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
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
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
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
...
@@ -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,
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
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
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
to be sent, and send it off. The number of task workers is limited by a constant
factor.
factor.
...
...
bitswap.go
View file @
b00f22ec
...
@@ -295,7 +295,7 @@ func (bs *Bitswap) CancelWants(cids []*cid.Cid, ses uint64) {
...
@@ -295,7 +295,7 @@ func (bs *Bitswap) CancelWants(cids []*cid.Cid, ses uint64) {
bs
.
wm
.
CancelWants
(
context
.
Background
(),
cids
,
nil
,
ses
)
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.
// service will potentially notify its peers.
func
(
bs
*
Bitswap
)
HasBlock
(
blk
blocks
.
Block
)
error
{
func
(
bs
*
Bitswap
)
HasBlock
(
blk
blocks
.
Block
)
error
{
return
bs
.
receiveBlockFrom
(
blk
,
""
)
return
bs
.
receiveBlockFrom
(
blk
,
""
)
...
...
decision/ledger.go
View file @
b00f22ec
...
@@ -24,7 +24,7 @@ type ledger struct {
...
@@ -24,7 +24,7 @@ type ledger struct {
// Partner is the remote Peer.
// Partner is the remote Peer.
Partner
peer
.
ID
Partner
peer
.
ID
// Accounting tracks bytes sent and rec
i
eved.
// Accounting tracks bytes sent and rece
i
ved.
Accounting
debtRatio
Accounting
debtRatio
// lastExchange is the time of the last data exchange.
// 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