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
006dd2ca
Commit
006dd2ca
authored
Mar 05, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
toprovide -> toProvide
parent
c3ce1319
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
workers.go
workers.go
+5
-5
No files found.
workers.go
View file @
006dd2ca
...
@@ -81,7 +81,7 @@ func (bs *Bitswap) provideWorker(ctx context.Context) {
...
@@ -81,7 +81,7 @@ func (bs *Bitswap) provideWorker(ctx context.Context) {
func
(
bs
*
Bitswap
)
provideCollector
(
ctx
context
.
Context
)
{
func
(
bs
*
Bitswap
)
provideCollector
(
ctx
context
.
Context
)
{
defer
close
(
bs
.
provideKeys
)
defer
close
(
bs
.
provideKeys
)
var
to
p
rovide
[]
u
.
Key
var
to
P
rovide
[]
u
.
Key
var
nextKey
u
.
Key
var
nextKey
u
.
Key
var
keysOut
chan
u
.
Key
var
keysOut
chan
u
.
Key
...
@@ -96,12 +96,12 @@ func (bs *Bitswap) provideCollector(ctx context.Context) {
...
@@ -96,12 +96,12 @@ func (bs *Bitswap) provideCollector(ctx context.Context) {
nextKey
=
blk
.
Key
()
nextKey
=
blk
.
Key
()
keysOut
=
bs
.
provideKeys
keysOut
=
bs
.
provideKeys
}
else
{
}
else
{
to
p
rovide
=
append
(
to
p
rovide
,
blk
.
Key
())
to
P
rovide
=
append
(
to
P
rovide
,
blk
.
Key
())
}
}
case
keysOut
<-
nextKey
:
case
keysOut
<-
nextKey
:
if
len
(
to
p
rovide
)
>
0
{
if
len
(
to
P
rovide
)
>
0
{
nextKey
=
to
p
rovide
[
0
]
nextKey
=
to
P
rovide
[
0
]
to
p
rovide
=
to
p
rovide
[
1
:
]
to
P
rovide
=
to
P
rovide
[
1
:
]
}
else
{
}
else
{
keysOut
=
nil
keysOut
=
nil
}
}
...
...
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