diff --git a/config.go b/config.go index b3930b01..f9ebf088 100644 --- a/config.go +++ b/config.go @@ -57,6 +57,7 @@ type chainConfig struct { TestNet3 bool `long:"testnet" description:"Use the test network"` SimNet bool `long:"simnet" description:"Use the simulation test network"` + RegTest bool `long:"regtest" description:"Use the regression test network"` } type neutrinoConfig struct { @@ -231,6 +232,10 @@ func loadConfig() (*config, error) { numNets++ activeNetParams = bitcoinTestNetParams } + if cfg.Bitcoin.RegTest { + numNets++ + activeNetParams = regTestNetParams + } if cfg.Bitcoin.SimNet { activeNetParams = bitcoinSimNetParams } diff --git a/params.go b/params.go index 9eda0038..828eb819 100644 --- a/params.go +++ b/params.go @@ -45,6 +45,12 @@ var liteTestNetParams = litecoinNetParams{ rpcPort: "19334", } +// regTestNetParams contains parameters specific to a local regtest network. +var regTestNetParams = bitcoinNetParams{ + Params: &bitcoinCfg.RegressionNetParams, + rpcPort: "18334", +} + // applyLitecoinParams applies the relevant chain configuration parameters that // differ for litecoin to the chain parameters typed for btcsuite derivation. // This function is used in place of using something like interface{} to