mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
multi: add testnet4 support
This commit is contained in:
@@ -17,6 +17,7 @@ type Chain struct {
|
||||
|
||||
MainNet bool `long:"mainnet" description:"Use the main network"`
|
||||
TestNet3 bool `long:"testnet" description:"Use the test network"`
|
||||
TestNet4 bool `long:"testnet4" description:"Use the testnet4 test network"`
|
||||
SimNet bool `long:"simnet" description:"Use the simulation test network"`
|
||||
RegTest bool `long:"regtest" description:"Use the regression test network"`
|
||||
SigNet bool `long:"signet" description:"Use the signet test network"`
|
||||
|
@@ -108,6 +108,14 @@ func CleanAndExpandPath(path string) string {
|
||||
// NormalizeNetwork returns the common name of a network type used to create
|
||||
// file paths. This allows differently versioned networks to use the same path.
|
||||
func NormalizeNetwork(network string) string {
|
||||
// The 4th testnet isn't the "default" yet, so we'll want to explicitly
|
||||
// point that to a "testnet4" directory.
|
||||
if network == "testnet4" {
|
||||
return network
|
||||
}
|
||||
|
||||
// We want to collapse "testnet3" and "testnet" to the same "testnet"
|
||||
// directory.
|
||||
if strings.HasPrefix(network, "testnet") {
|
||||
return "testnet"
|
||||
}
|
||||
|
Reference in New Issue
Block a user