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
|
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
|
// The litecoin chain is the current active chain. However
|
||||||
// throughout the codebase we required chaincfg.Params. So as a
|
// throughout the codebase we required chaincfg.Params. So as a
|
||||||
// temporary hack, we'll mutate the default net params for
|
// temporary hack, we'll mutate the default net params for
|
||||||
@ -634,6 +641,13 @@ func loadConfig() (*config, error) {
|
|||||||
return nil, err
|
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 {
|
if cfg.Bitcoin.Node == "neutrino" && cfg.Bitcoin.MainNet {
|
||||||
str := "%s: neutrino isn't yet supported for " +
|
str := "%s: neutrino isn't yet supported for " +
|
||||||
"bitcoin's mainnet"
|
"bitcoin's mainnet"
|
||||||
|
Loading…
Reference in New Issue
Block a user