loopd: export DefaultConfig

This commit is contained in:
Oliver Gugger 2020-05-15 12:17:55 +02:00
parent bdfd382dec
commit 5f70a05463
No known key found for this signature in database
GPG key ID: 8E4256593F177720
2 changed files with 19 additions and 16 deletions

View file

@ -59,19 +59,22 @@ const (
testnetServer = "test.swap.lightning.today:11010"
)
var defaultConfig = config{
Network: "mainnet",
RPCListen: "localhost:11010",
RESTListen: "localhost:8081",
Insecure: false,
LogDir: defaultLogDir,
MaxLogFiles: defaultMaxLogFiles,
MaxLogFileSize: defaultMaxLogFileSize,
DebugLevel: defaultLogLevel,
MaxLSATCost: lsat.DefaultMaxCostSats,
MaxLSATFee: lsat.DefaultMaxRoutingFeeSats,
LoopOutMaxParts: defaultLoopOutMaxParts,
Lnd: &lndConfig{
Host: "localhost:10009",
},
// DefaultConfig returns all default values for the Config struct.
func DefaultConfig() config {
return config{
Network: "mainnet",
RPCListen: "localhost:11010",
RESTListen: "localhost:8081",
Insecure: false,
LogDir: defaultLogDir,
MaxLogFiles: defaultMaxLogFiles,
MaxLogFileSize: defaultMaxLogFileSize,
DebugLevel: defaultLogLevel,
MaxLSATCost: lsat.DefaultMaxCostSats,
MaxLSATFee: lsat.DefaultMaxRoutingFeeSats,
LoopOutMaxParts: defaultLoopOutMaxParts,
Lnd: &lndConfig{
Host: "localhost:10009",
},
}
}

View file

@ -92,7 +92,7 @@ func newListenerCfg(config *config, rpcCfg RPCConfig) *listenerCfg {
}
func Start(rpcCfg RPCConfig) error {
config := defaultConfig
config := DefaultConfig()
// Parse command line flags.
parser := flags.NewParser(&config, flags.Default)