提交 6c2a6669 作者: Brian Tiger Chow 提交者: Jeromy

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

License: MIT
Signed-off-by: 's avatarBrian Tiger Chow <brian@perfmode.com>
上级 3ee7ff54
......@@ -158,14 +158,14 @@ func (bs *bitswap) run(ctx context.Context) {
var sendlist <-chan peer.Peer
// Every so often, we should resend out our current want list
rebroadcastTime := time.Second * 5
const rebroadcastTime = time.Second * 5
// Time to wait before sending out wantlists to better batch up requests
bufferTime := time.Millisecond * 3
const bufferTime = time.Millisecond * 3
peersPerSend := 6
timeout := time.After(rebroadcastTime)
threshold := 10
const threshold = 10
unsent := 0
for {
select {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论