@cryptotaxi247 / kubo / commits / 3ee7ff54b

naming

License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Brian Tiger Chow committed Nov 18, 2014 at 22:31 UTC 3ee7ff54bab5251c7d711f12505edcc2cb0ba6bb
1 file changed +4 -4
exchange/bitswap/bitswap.go
+4 -4
@@ -43,7 +43,7 @@ func New(ctx context.Context, p peer.Peer,
43 routing: routing,
44 sender: network,
45 wantlist: u.NewKeySet(),
46 - blockReq: make(chan u.Key, 32),
46 + blockRequests: make(chan u.Key, 32),
47 }
48 network.SetDelegate(bs)
49 go bs.run(ctx)
@@ -66,7 +66,7 @@ type bitswap struct {
66
67 notifications notifications.PubSub
68
69 - blockReq chan u.Key
69 + blockRequests chan u.Key
70
71 // strategy listens to network traffic and makes decisions about how to
72 // interact with partners.
@@ -100,7 +100,7 @@ func (bs *bitswap) GetBlock(parent context.Context, k u.Key) (*blocks.Block, err
100 promise := bs.notifications.Subscribe(ctx, k)
101
102 select {
103 - case bs.blockReq <- k:
103 + case bs.blockRequests <- k:
104 case <-parent.Done():
105 return nil, parent.Err()
106 }
@@ -185,7 +185,7 @@ func (bs *bitswap) run(ctx context.Context) {
185 }
186 sendlist = nil
187 timeout = time.After(rebroadcastTime)
188 - case k := <-bs.blockReq:
188 + case k := <-bs.blockRequests:
189 if unsent == 0 {
190 sendlist = bs.routing.FindProvidersAsync(ctx, k, peersPerSend)
191 }