config: Add back simnet.
This commit is contained in:
parent
96b99f35d7
commit
61911a3f3b
@ -51,7 +51,7 @@ type config struct {
|
|||||||
LogLevel string `long:"loglevel" ini-name:"loglevel" description:"Logging level." choice:"trace" choice:"debug" choice:"info" choice:"warn" choice:"error" choice:"critical"`
|
LogLevel string `long:"loglevel" ini-name:"loglevel" description:"Logging level." choice:"trace" choice:"debug" choice:"info" choice:"warn" choice:"error" choice:"critical"`
|
||||||
MaxLogSize int64 `long:"maxlogsize" ini-name:"maxlogsize" description:"File size threshold for log file rotation (MB)."`
|
MaxLogSize int64 `long:"maxlogsize" ini-name:"maxlogsize" description:"File size threshold for log file rotation (MB)."`
|
||||||
LogsToKeep int `long:"logstokeep" ini-name:"logstokeep" description:"The number of rotated log files to keep."`
|
LogsToKeep int `long:"logstokeep" ini-name:"logstokeep" description:"The number of rotated log files to keep."`
|
||||||
Network string `long:"network" ini-name:"network" description:"Decred network to use." choice:"testnet" choice:"mainnet"`
|
Network string `long:"network" ini-name:"network" description:"Decred network to use." choice:"testnet" choice:"mainnet" choice:"simnet"`
|
||||||
VSPFee float64 `long:"vspfee" ini-name:"vspfee" description:"Fee percentage charged for VSP use. eg. 2.0 (2%), 0.5 (0.5%)."`
|
VSPFee float64 `long:"vspfee" ini-name:"vspfee" description:"Fee percentage charged for VSP use. eg. 2.0 (2%), 0.5 (0.5%)."`
|
||||||
DcrdHost string `long:"dcrdhost" ini-name:"dcrdhost" description:"The ip:port to establish a JSON-RPC connection with dcrd. Should be the same host where vspd is running."`
|
DcrdHost string `long:"dcrdhost" ini-name:"dcrdhost" description:"The ip:port to establish a JSON-RPC connection with dcrd. Should be the same host where vspd is running."`
|
||||||
DcrdUser string `long:"dcrduser" ini-name:"dcrduser" description:"Username for dcrd RPC connections."`
|
DcrdUser string `long:"dcrduser" ini-name:"dcrduser" description:"Username for dcrd RPC connections."`
|
||||||
@ -283,6 +283,8 @@ func loadConfig() (*config, error) {
|
|||||||
cfg.netParams = &testNet3Params
|
cfg.netParams = &testNet3Params
|
||||||
case "mainnet":
|
case "mainnet":
|
||||||
cfg.netParams = &mainNetParams
|
cfg.netParams = &mainNetParams
|
||||||
|
case "simnet":
|
||||||
|
cfg.netParams = &simNetParams
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure backup interval is greater than 30 seconds.
|
// Ensure backup interval is greater than 30 seconds.
|
||||||
|
|||||||
@ -44,6 +44,16 @@ var testNet3Params = netParams{
|
|||||||
dcp0005Height: 323328,
|
dcp0005Height: 323328,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var simNetParams = netParams{
|
||||||
|
Params: chaincfg.SimNetParams(),
|
||||||
|
dcrdRPCServerPort: "19556",
|
||||||
|
walletRPCServerPort: "19557",
|
||||||
|
blockExplorerURL: "...",
|
||||||
|
minWallets: 1,
|
||||||
|
// dcp0005Height on simnet is 1 because the agenda will always be active.
|
||||||
|
dcp0005Height: 1,
|
||||||
|
}
|
||||||
|
|
||||||
// dcp5Active returns true if the DCP-0005 block header commitments agenda is
|
// dcp5Active returns true if the DCP-0005 block header commitments agenda is
|
||||||
// active on this network at the provided height, otherwise false.
|
// active on this network at the provided height, otherwise false.
|
||||||
func (n *netParams) dcp5Active(height int64) bool {
|
func (n *netParams) dcp5Active(height int64) bool {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user