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
689398fb
Commit
689398fb
authored
Mar 19, 2018
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: Remove some dead code
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
461bdd1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
bitswap.go
bitswap.go
+2
-2
testutils.go
testutils.go
+1
-3
No files found.
bitswap.go
View file @
689398fb
...
@@ -66,8 +66,8 @@ var rebroadcastDelay = delay.Fixed(time.Minute)
...
@@ -66,8 +66,8 @@ var rebroadcastDelay = delay.Fixed(time.Minute)
// BitSwapNetwork. This function registers the returned instance as the network
// BitSwapNetwork. This function registers the returned instance as the network
// delegate.
// delegate.
// Runs until context is cancelled.
// Runs until context is cancelled.
func
New
(
parent
context
.
Context
,
p
peer
.
ID
,
network
bsnet
.
BitSwapNetwork
,
func
New
(
parent
context
.
Context
,
network
bsnet
.
BitSwapNetwork
,
bstore
blockstore
.
Blockstore
,
nice
bool
)
exchange
.
Interface
{
bstore
blockstore
.
Blockstore
)
exchange
.
Interface
{
// important to use provided parent context (since it may include important
// important to use provided parent context (since it may include important
// loggable data). It's probably not a good idea to allow bitswap to be
// loggable data). It's probably not a good idea to allow bitswap to be
...
...
testutils.go
View file @
689398fb
...
@@ -99,9 +99,7 @@ func MkSession(ctx context.Context, net tn.Network, p testutil.Identity) Instanc
...
@@ -99,9 +99,7 @@ func MkSession(ctx context.Context, net tn.Network, p testutil.Identity) Instanc
panic
(
err
.
Error
())
// FIXME perhaps change signature and return error.
panic
(
err
.
Error
())
// FIXME perhaps change signature and return error.
}
}
const
alwaysSendToPeer
=
true
bs
:=
New
(
ctx
,
adapter
,
bstore
)
.
(
*
Bitswap
)
bs
:=
New
(
ctx
,
p
.
ID
(),
adapter
,
bstore
,
alwaysSendToPeer
)
.
(
*
Bitswap
)
return
Instance
{
return
Instance
{
Peer
:
p
.
ID
(),
Peer
:
p
.
ID
(),
...
...
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