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-unixfs
Commits
83088372
Commit
83088372
authored
Sep 17, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(bitswap) remove dead/unused wantlist code
parent
547f9e1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
18 deletions
+0
-18
bitswap/bitswap.go
bitswap/bitswap.go
+0
-18
No files found.
bitswap/bitswap.go
View file @
83088372
...
...
@@ -52,9 +52,6 @@ type bitswap struct {
// haveList is the set of keys we have values for. a map for fast lookups.
// haveList KeySet -- not needed. all values in datastore?
// wantList is the set of keys we want values for. a map for fast lookups.
wantList
KeySet
strategy
strategyFunc
haltChan
chan
struct
{}
...
...
@@ -68,7 +65,6 @@ func NewSession(parent context.Context, s bsnet.NetworkService, p *peer.Peer, d
peer
:
p
,
blockstore
:
blockstore
.
NewBlockstore
(
d
),
partners
:
ledgerMap
{},
wantList
:
KeySet
{},
routing
:
directory
,
sender
:
bsnet
.
NewNetworkAdapter
(
s
,
&
receiver
),
haltChan
:
make
(
chan
struct
{}),
...
...
@@ -208,20 +204,6 @@ func (bs *bitswap) getLedger(p *peer.Peer) *ledger {
return
l
}
func
(
bs
*
bitswap
)
SendWantList
(
wl
KeySet
)
error
{
message
:=
bsmsg
.
New
()
for
k
,
_
:=
range
wl
{
message
.
AppendWanted
(
k
)
}
// Lets just ping everybody all at once
for
_
,
ledger
:=
range
bs
.
partners
{
bs
.
sender
.
SendMessage
(
context
.
TODO
(),
ledger
.
Partner
,
message
)
}
return
nil
}
func
(
bs
*
bitswap
)
Halt
()
{
bs
.
haltChan
<-
struct
{}{}
}
...
...
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