@cryptotaxi247 / kubo / commits / cf1d46388

rename var

Brian Tiger Chow committed Oct 27, 2014 at 07:04 UTC cf1d4638854f9058acf211a0354f8fa07a78ef3f
1 file changed +4 -5
exchange/bitswap/bitswap.go
+4 -5
@@ -29,10 +29,7 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
29 net inet.Network, srv inet.Service, routing bsnet.Routing,
30 d ds.ThreadSafeDatastore, nice bool) exchange.Interface {
31
32 - networkAdapter := bsnet.NetMessageAdapter(srv, net, nil)
33 -
32 notif := notifications.New()
35 -
33 go func() {
34 select {
35 case <-ctx.Done():
@@ -40,15 +37,17 @@ func NetMessageSession(ctx context.Context, p peer.Peer,
37 }
38 }()
39
40 + network := bsnet.NetMessageAdapter(srv, net, nil)
41 +
42 bs := &bitswap{
43 blockstore: blockstore.NewBlockstore(d),
44 notifications: notif,
45 strategy: strategy.New(nice),
46 routing: routing,
48 - sender: networkAdapter,
47 + sender: network,
48 wantlist: u.NewKeySet(),
49 }
51 - networkAdapter.SetDelegate(bs)
50 + network.SetDelegate(bs)
51
52 return bs
53 }