1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 18:13:54 +08:00

chore(bitswap) rm vestigial fields

This commit is contained in:
Brian Tiger Chow
2014-09-17 18:28:20 -07:00
parent b8fcc137a6
commit 2dc8bc8381

View File

@ -50,13 +50,9 @@ type bitswap struct {
// TODO(brian): save the strategist's state to the datastore
strategist strategy.Strategist
partners ledgerMap
// haveList is the set of keys we have values for. a map for fast lookups.
// haveList KeySet -- not needed. all values in datastore?
strategy strategyFunc
haltChan chan struct{}
}
@ -68,12 +64,10 @@ func NewSession(parent context.Context, s bsnet.NetworkService, p *peer.Peer, d
bs := &bitswap{
peer: p,
blockstore: blockstore.NewBlockstore(d),
partners: ledgerMap{},
routing: directory,
sender: bsnet.NewNetworkAdapter(s, &receiver),
haltChan: make(chan struct{}),
notifications: notifications.New(),
strategy: yesManStrategy,
}
receiver.Delegate(bs)