Commit 6a64affb authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

rename var

parent 9ac61865
...@@ -29,10 +29,7 @@ func NetMessageSession(ctx context.Context, p peer.Peer, ...@@ -29,10 +29,7 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
net inet.Network, srv inet.Service, routing bsnet.Routing, net inet.Network, srv inet.Service, routing bsnet.Routing,
d ds.ThreadSafeDatastore, nice bool) exchange.Interface { d ds.ThreadSafeDatastore, nice bool) exchange.Interface {
networkAdapter := bsnet.NetMessageAdapter(srv, net, nil)
notif := notifications.New() notif := notifications.New()
go func() { go func() {
select { select {
case <-ctx.Done(): case <-ctx.Done():
...@@ -40,15 +37,17 @@ func NetMessageSession(ctx context.Context, p peer.Peer, ...@@ -40,15 +37,17 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
} }
}() }()
network := bsnet.NetMessageAdapter(srv, net, nil)
bs := &bitswap{ bs := &bitswap{
blockstore: blockstore.NewBlockstore(d), blockstore: blockstore.NewBlockstore(d),
notifications: notif, notifications: notif,
strategy: strategy.New(nice), strategy: strategy.New(nice),
routing: routing, routing: routing,
sender: networkAdapter, sender: network,
wantlist: u.NewKeySet(), wantlist: u.NewKeySet(),
} }
networkAdapter.SetDelegate(bs) network.SetDelegate(bs)
return bs return bs
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment