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