mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
Merge pull request #1475 from cfromknecht/disable-mainnet-debug-htlc
config: disable debug-htlc mode on mainnet
This commit is contained in:
commit
552a371f09
14
config.go
14
config.go
@ -552,6 +552,13 @@ func loadConfig() (*config, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if cfg.Litecoin.MainNet && cfg.DebugHTLC {
|
||||
str := "%s: debug-htlc mode cannot be used " +
|
||||
"on litecoin mainnet"
|
||||
err := fmt.Errorf(str, funcName)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// The litecoin chain is the current active chain. However
|
||||
// throughout the codebase we required chaincfg.Params. So as a
|
||||
// temporary hack, we'll mutate the default net params for
|
||||
@ -634,6 +641,13 @@ func loadConfig() (*config, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if cfg.Bitcoin.MainNet && cfg.DebugHTLC {
|
||||
str := "%s: debug-htlc mode cannot be used " +
|
||||
"on bitcoin mainnet"
|
||||
err := fmt.Errorf(str, funcName)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if cfg.Bitcoin.Node == "neutrino" && cfg.Bitcoin.MainNet {
|
||||
str := "%s: neutrino isn't yet supported for " +
|
||||
"bitcoin's mainnet"
|
||||
|
Loading…
Reference in New Issue
Block a user