Move DNS seed consts to same file that uses them.

Also, use multi constant define for the result.
This commit is contained in:
Dave Collins 2013-10-07 17:57:43 -05:00
parent c03f2b757b
commit 849c830cf8
2 changed files with 17 additions and 14 deletions

View file

@ -17,13 +17,6 @@ import (
"runtime" "runtime"
) )
// These constants are used by the dns seed code to pick a random last seen
// time.
const (
secondsIn3Days int32 = 24 * 60 * 60 * 3
secondsIn4Days int32 = 24 * 60 * 60 * 4
)
var ( var (
log = seelog.Disabled log = seelog.Disabled
cfg *config cfg *config

View file

@ -16,15 +16,25 @@ import (
"time" "time"
) )
// supportedServices describes which services are supported by the server. // These constants are used by the DNS seed code to pick a random last seen
const supportedServices = btcwire.SFNodeNetwork // time.
const (
secondsIn3Days int32 = 24 * 60 * 60 * 3
secondsIn4Days int32 = 24 * 60 * 60 * 4
)
// connectionRetryInterval is the amount of time to wait in between retries const (
// when connecting to persistent peers. // supportedServices describes which services are supported by the
const connectionRetryInterval = time.Second * 10 // server.
supportedServices = btcwire.SFNodeNetwork
// defaultMaxOutbound is the default number of max outbound peers. // connectionRetryInterval is the amount of time to wait in between
const defaultMaxOutbound = 8 // retries when connecting to persistent peers.
connectionRetryInterval = time.Second * 10
// defaultMaxOutbound is the default number of max outbound peers.
defaultMaxOutbound = 8
)
// broadcastMsg provides the ability to house a bitcoin message to be broadcast // broadcastMsg provides the ability to house a bitcoin message to be broadcast
// to all connected peers except specified excluded peers. // to all connected peers except specified excluded peers.