@cryptotaxi247 / kubo / commits / 6c2a6669c

constify to make it clear what _can_ and _can't_ change over time

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

Brian Tiger Chow committed Nov 18, 2014 at 22:37 UTC 6c2a6669cb97a81c3f40364962530c0a800dddc1
1 file changed +3 -3
exchange/bitswap/bitswap.go
+3 -3
@@ -158,14 +158,14 @@ func (bs *bitswap) run(ctx context.Context) {
158 var sendlist <-chan peer.Peer
159
160 // Every so often, we should resend out our current want list
161 - rebroadcastTime := time.Second * 5
161 + const rebroadcastTime = time.Second * 5
162
163 // Time to wait before sending out wantlists to better batch up requests
164 - bufferTime := time.Millisecond * 3
164 + const bufferTime = time.Millisecond * 3
165 peersPerSend := 6
166
167 timeout := time.After(rebroadcastTime)
168 - threshold := 10
168 + const threshold = 10
169 unsent := 0
170 for {
171 select {