chore(bitswap) rm halt chan since bitswap has no daemon
Brian Tiger Chow committed
Sep 17, 2014 at 18:28 UTC
36ce8a280b8077dc3a09c8f23393947ae068ea3b
1 file changed
-10
bitswap/bitswap.go
-10
@@ -49,11 +49,6 @@ type bitswap struct {
49
// interact with partners.
50
// TODO(brian): save the strategist's state to the datastore
51
strategist strategy.Strategist
52
-
53
- // haveList is the set of keys we have values for. a map for fast lookups.
54
- // haveList KeySet -- not needed. all values in datastore?
55
-
56
- haltChan chan struct{}
52
}
53
54
// NewSession initializes a bitswap session.
@@ -66,7 +61,6 @@ func NewSession(parent context.Context, s bsnet.NetworkService, p *peer.Peer, d
61
blockstore: blockstore.NewBlockstore(d),
62
routing: directory,
63
sender: bsnet.NewNetworkAdapter(s, &receiver),
69
- haltChan: make(chan struct{}),
64
notifications: notifications.New(),
65
}
66
receiver.Delegate(bs)
@@ -156,10 +150,6 @@ func (bs *bitswap) send(p *peer.Peer, b blocks.Block) {
150
bs.strategist.MessageSent(p, message)
151
}
152
159
-func (bs *bitswap) Halt() {
160
- bs.haltChan <- struct{}{}
161
-}
162
-
153
// TODO(brian): handle errors
154
func (bs *bitswap) ReceiveMessage(
155
ctx context.Context, sender *peer.Peer, incoming bsmsg.BitSwapMessage) (