mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-04 05:16:23 +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")
|
var log = eventlog.Logger("bitswap")
|
||||||
|
|
||||||
// Number of providers to request for sending a wantlist to
|
const (
|
||||||
// TODO: if a 'non-nice' strategy is implemented, consider increasing this value
|
// Number of providers to request for sending a wantlist to
|
||||||
const maxProvidersPerRequest = 3
|
// 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 (
|
||||||
var hasBlockTimeout = time.Second * 15
|
rebroadcastDelay = time.Second * 10
|
||||||
var rebroadcastDelay = time.Second * 10
|
)
|
||||||
|
|
||||||
// New initializes a BitSwap instance that communicates over the provided
|
// New initializes a BitSwap instance that communicates over the provided
|
||||||
// BitSwapNetwork. This function registers the returned instance as the network
|
// BitSwapNetwork. This function registers the returned instance as the network
|
||||||
|
Reference in New Issue
Block a user