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
39d168d6
Commit
39d168d6
authored
Dec 05, 2017
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bitswap: remove useless code
License: MIT Signed-off-by:
Steven Allen
<
steven@stebalien.com
>
parent
bd024d24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
bitswap.go
bitswap.go
+0
-10
No files found.
bitswap.go
View file @
39d168d6
...
...
@@ -372,16 +372,6 @@ func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg
return
}
// quickly send out cancels, reduces chances of duplicate block receives
var
keys
[]
*
cid
.
Cid
for
_
,
block
:=
range
iblocks
{
if
_
,
found
:=
bs
.
wm
.
wl
.
Contains
(
block
.
Cid
());
!
found
{
log
.
Infof
(
"received un-asked-for %s from %s"
,
block
,
p
)
continue
}
keys
=
append
(
keys
,
block
.
Cid
())
}
wg
:=
sync
.
WaitGroup
{}
for
_
,
block
:=
range
iblocks
{
wg
.
Add
(
1
)
...
...
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