loopd: export DefaultConfig

pull/202/head
Oliver Gugger 4 years ago
parent bdfd382dec
commit 5f70a05463
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

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

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

Loading…
Cancel
Save