Skip to content

Commit 5f70a05

Browse files
committed
loopd: export DefaultConfig
1 parent bdfd382 commit 5f70a05

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

loopd/config.go

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,22 @@ const (
5959
testnetServer = "test.swap.lightning.today:11010"
6060
)
6161

62-
var defaultConfig = config{
63-
Network: "mainnet",
64-
RPCListen: "localhost:11010",
65-
RESTListen: "localhost:8081",
66-
Insecure: false,
67-
LogDir: defaultLogDir,
68-
MaxLogFiles: defaultMaxLogFiles,
69-
MaxLogFileSize: defaultMaxLogFileSize,
70-
DebugLevel: defaultLogLevel,
71-
MaxLSATCost: lsat.DefaultMaxCostSats,
72-
MaxLSATFee: lsat.DefaultMaxRoutingFeeSats,
73-
LoopOutMaxParts: defaultLoopOutMaxParts,
74-
Lnd: &lndConfig{
75-
Host: "localhost:10009",
76-
},
62+
// DefaultConfig returns all default values for the Config struct.
63+
func DefaultConfig() config {
64+
return config{
65+
Network: "mainnet",
66+
RPCListen: "localhost:11010",
67+
RESTListen: "localhost:8081",
68+
Insecure: false,
69+
LogDir: defaultLogDir,
70+
MaxLogFiles: defaultMaxLogFiles,
71+
MaxLogFileSize: defaultMaxLogFileSize,
72+
DebugLevel: defaultLogLevel,
73+
MaxLSATCost: lsat.DefaultMaxCostSats,
74+
MaxLSATFee: lsat.DefaultMaxRoutingFeeSats,
75+
LoopOutMaxParts: defaultLoopOutMaxParts,
76+
Lnd: &lndConfig{
77+
Host: "localhost:10009",
78+
},
79+
}
7780
}

loopd/start.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func newListenerCfg(config *config, rpcCfg RPCConfig) *listenerCfg {
9292
}
9393

9494
func Start(rpcCfg RPCConfig) error {
95-
config := defaultConfig
95+
config := DefaultConfig()
9696

9797
// Parse command line flags.
9898
parser := flags.NewParser(&config, flags.Default)

0 commit comments

Comments
 (0)