mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 19:24:14 +08:00
style constify variables
good to const until it's required for them to be variable. TODO pass them in as configuration options
This commit is contained in:

committed by
Juan Batiz-Benet

parent
8bef1dce80
commit
a495a014af
@ -24,13 +24,17 @@ import (
|
||||
|
||||
var log = eventlog.Logger("bitswap")
|
||||
|
||||
// Number of providers to request for sending a wantlist to
|
||||
// TODO: if a 'non-nice' strategy is implemented, consider increasing this value
|
||||
const maxProvidersPerRequest = 3
|
||||
const (
|
||||
// Number of providers to request for sending a wantlist to
|
||||
// TODO: if a 'non-nice' strategy is implemented, consider increasing this value
|
||||
maxProvidersPerRequest = 3
|
||||
providerRequestTimeout = time.Second * 10
|
||||
hasBlockTimeout = time.Second * 15
|
||||
)
|
||||
|
||||
var providerRequestTimeout = time.Second * 10
|
||||
var hasBlockTimeout = time.Second * 15
|
||||
var rebroadcastDelay = time.Second * 10
|
||||
var (
|
||||
rebroadcastDelay = time.Second * 10
|
||||
)
|
||||
|
||||
// New initializes a BitSwap instance that communicates over the provided
|
||||
// BitSwapNetwork. This function registers the returned instance as the network
|
||||
|
Reference in New Issue
Block a user