Commit f03e629f authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

style constify variables

good to const until it's required for them to be variable.

TODO pass them in as configuration options
parent bf61c8ce
...@@ -24,13 +24,17 @@ import ( ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment