config

package
v0.0.7-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2019 License: ISC Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//DefaultConnectTimeout is the default connection timeout when dialing
	DefaultConnectTimeout = time.Second * 30

	//DefaultMaxOrphanTxSize is the default maximum size for an orphan transaction
	DefaultMaxOrphanTxSize = 100000
)

Variables

View Source
var (
	// DefaultHomeDir is the default home directory for BTCD.
	DefaultHomeDir = util.AppDataDir("btcd", false)
)
View Source
var RunServiceCommand func(string) error

RunServiceCommand is only set to a real function on Windows. It is used to parse and execute service commands specified via the -s flag.

Functions

func ActiveNetParams

func ActiveNetParams() *dagconfig.Params

ActiveNetParams returns a pointer to the current active net params

func LoadAndSetMainConfig

func LoadAndSetMainConfig() error

LoadAndSetMainConfig loads the config that can be afterward be accesible through MainConfig()

Types

type Config

type Config struct {
	Lookup         func(string) ([]net.IP, error)
	OnionDial      func(string, string, time.Duration) (net.Conn, error)
	Dial           func(string, string, time.Duration) (net.Conn, error)
	AddCheckpoints []dagconfig.Checkpoint
	MiningAddrs    []util.Address
	MinRelayTxFee  util.Amount
	Whitelists     []*net.IPNet
	SubnetworkID   *subnetworkid.SubnetworkID // nil in full nodes
	// contains filtered or unexported fields
}

Config defines the configuration options for btcd.

See loadConfig for details on the configuration load process.

func MainConfig

func MainConfig() *Config

MainConfig is a getter to the main config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL