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
6a64affb
Commit
6a64affb
authored
Oct 27, 2014
by
Brian Tiger Chow
Committed by
Juan Batiz-Benet
Nov 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename var
parent
9ac61865
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
bitswap.go
bitswap.go
+4
-5
No files found.
bitswap.go
View file @
6a64affb
...
...
@@ -29,10 +29,7 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
net
inet
.
Network
,
srv
inet
.
Service
,
routing
bsnet
.
Routing
,
d
ds
.
ThreadSafeDatastore
,
nice
bool
)
exchange
.
Interface
{
networkAdapter
:=
bsnet
.
NetMessageAdapter
(
srv
,
net
,
nil
)
notif
:=
notifications
.
New
()
go
func
()
{
select
{
case
<-
ctx
.
Done
()
:
...
...
@@ -40,15 +37,17 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
}
}()
network
:=
bsnet
.
NetMessageAdapter
(
srv
,
net
,
nil
)
bs
:=
&
bitswap
{
blockstore
:
blockstore
.
NewBlockstore
(
d
),
notifications
:
notif
,
strategy
:
strategy
.
New
(
nice
),
routing
:
routing
,
sender
:
network
Adapter
,
sender
:
network
,
wantlist
:
u
.
NewKeySet
(),
}
network
Adapter
.
SetDelegate
(
bs
)
network
.
SetDelegate
(
bs
)
return
bs
}
...
...
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