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-blockservice
Commits
f26d40ed
Commit
f26d40ed
authored
Jul 07, 2017
by
Jakub Sztandera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bitswap: add few method comments
License: MIT Signed-off-by:
Jakub Sztandera
<
kubuxu@protonmail.ch
>
parent
5b4cb569
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
blockservice.go
blockservice.go
+2
-0
No files found.
blockservice.go
View file @
f26d40ed
...
@@ -78,6 +78,8 @@ func (bs *blockService) Exchange() exchange.Interface {
...
@@ -78,6 +78,8 @@ func (bs *blockService) Exchange() exchange.Interface {
return
bs
.
exchange
return
bs
.
exchange
}
}
// NewSession creates a bitswap session that allows for controlled exchange of
// wantlists to decrease the bandwidth overhead.
func
NewSession
(
ctx
context
.
Context
,
bs
BlockService
)
*
Session
{
func
NewSession
(
ctx
context
.
Context
,
bs
BlockService
)
*
Session
{
exchange
:=
bs
.
Exchange
()
exchange
:=
bs
.
Exchange
()
if
bswap
,
ok
:=
exchange
.
(
*
bitswap
.
Bitswap
);
ok
{
if
bswap
,
ok
:=
exchange
.
(
*
bitswap
.
Bitswap
);
ok
{
...
...
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