btcctl: add signet param
This commit adds the --signet command line flag to the btcctl utility.
This commit is contained in:
parent
8a62cf0ef5
commit
7d1ab0b4d7
1 changed files with 11 additions and 0 deletions
|
@ -107,6 +107,7 @@ type config struct {
|
||||||
SimNet bool `long:"simnet" description:"Connect to the simulation test network"`
|
SimNet bool `long:"simnet" description:"Connect to the simulation test network"`
|
||||||
TLSSkipVerify bool `long:"skipverify" description:"Do not verify tls certificates (not recommended!)"`
|
TLSSkipVerify bool `long:"skipverify" description:"Do not verify tls certificates (not recommended!)"`
|
||||||
TestNet3 bool `long:"testnet" description:"Connect to testnet"`
|
TestNet3 bool `long:"testnet" description:"Connect to testnet"`
|
||||||
|
SigNet bool `long:"signet" description:"Connect to signet"`
|
||||||
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
|
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
|
||||||
Wallet bool `long:"wallet" description:"Connect to wallet"`
|
Wallet bool `long:"wallet" description:"Connect to wallet"`
|
||||||
}
|
}
|
||||||
|
@ -138,6 +139,12 @@ func normalizeAddress(addr string, chain *chaincfg.Params, useWallet bool) (stri
|
||||||
} else {
|
} else {
|
||||||
defaultPort = "18334"
|
defaultPort = "18334"
|
||||||
}
|
}
|
||||||
|
case &chaincfg.SigNetParams:
|
||||||
|
if useWallet {
|
||||||
|
defaultPort = "38332"
|
||||||
|
} else {
|
||||||
|
defaultPort = "38332"
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
if useWallet {
|
if useWallet {
|
||||||
defaultPort = "8332"
|
defaultPort = "8332"
|
||||||
|
@ -273,6 +280,10 @@ func loadConfig() (*config, []string, error) {
|
||||||
numNets++
|
numNets++
|
||||||
network = &chaincfg.RegressionNetParams
|
network = &chaincfg.RegressionNetParams
|
||||||
}
|
}
|
||||||
|
if cfg.SigNet {
|
||||||
|
numNets++
|
||||||
|
network = &chaincfg.SigNetParams
|
||||||
|
}
|
||||||
|
|
||||||
if numNets > 1 {
|
if numNets > 1 {
|
||||||
str := "%s: Multiple network params can't be used " +
|
str := "%s: Multiple network params can't be used " +
|
||||||
|
|
Loading…
Reference in a new issue