config

package
v0.0.0-...-1a2b024 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MainNet = Network{
	Params:              chaincfg.MainNetParams(),
	DcrdRPCServerPort:   "9109",
	WalletRPCServerPort: "9110",
	BlockExplorerURL:    "https://dcrdata.decred.org",
	MinWallets:          3,

	DCP0005Height: 431488,

	DCP0010Height: 657280,

	DCP0012Height: 794368,
}
View Source
var SimNet = Network{
	Params:              chaincfg.SimNetParams(),
	DcrdRPCServerPort:   "19556",
	WalletRPCServerPort: "19557",
	BlockExplorerURL:    "...",
	MinWallets:          1,

	DCP0005Height: 1,

	DCP0010Height: 1,

	DCP0012Height: 1,
}
View Source
var TestNet3 = Network{
	Params:              chaincfg.TestNet3Params(),
	DcrdRPCServerPort:   "19109",
	WalletRPCServerPort: "19110",
	BlockExplorerURL:    "https://testnet.dcrdata.org",
	MinWallets:          1,

	DCP0005Height: 323328,

	DCP0010Height: 877728,

	DCP0012Height: 1170048,
}

Functions

func WriteHelp

func WriteHelp(cfg interface{}) bool

WriteHelp will write the application help to stdout if it has been requested via command line options. Only the help option is evaluated, any invalid options are ignored. The return value indicates whether the help message was printed or not.

Types

type Network

type Network struct {
	*chaincfg.Params
	DcrdRPCServerPort   string
	WalletRPCServerPort string
	BlockExplorerURL    string
	// MinWallets is the minimum number of voting wallets required for a vspd
	// deployment on this network. vspd will log an error and refuse to start if
	// fewer wallets are configured.
	MinWallets int
	// DCP0005Height is the activation height of DCP-0005 block header
	// commitments agenda on this network.
	DCP0005Height int64
	// DCP0010Height is the activation height of DCP-0010 change PoW/PoS subsidy
	// split agenda on this network.
	DCP0010Height int64
	// DCP0012Height is the activation height of DCP-0012 change PoW/PoS subsidy
	// split R2 agenda on this network.
	DCP0012Height int64
}

func NetworkFromName

func NetworkFromName(name string) (*Network, error)

func (*Network) CurrentVoteVersion

func (n *Network) CurrentVoteVersion() uint32

CurrentVoteVersion returns the most recent version in the current networks consensus agenda deployments.

func (*Network) DCP10Active

func (n *Network) DCP10Active(height int64) bool

DCP10Active returns true if the DCP-0010 change PoW/PoS subsidy split agenda is active on this network at the provided height, otherwise false.

func (*Network) DCP12Active

func (n *Network) DCP12Active(height int64) bool

DCP12Active returns true if the DCP-0012 change PoW/PoS subsidy split R2 agenda is active on this network at the provided height, otherwise false.

func (*Network) DCP5Active

func (n *Network) DCP5Active(height int64) bool

DCP5Active returns true if the DCP-0005 block header commitments agenda is active on this network at the provided height, otherwise false.

Jump to

Keyboard shortcuts

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