mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopd: export Config struct
This commit is contained in:
parent
5f70a05463
commit
e696a38ec8
5 changed files with 7 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ type lndConfig struct {
|
|||
|
||||
type viewParameters struct{}
|
||||
|
||||
type config struct {
|
||||
type Config struct {
|
||||
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
|
||||
Insecure bool `long:"insecure" description:"disable tls"`
|
||||
Network string `long:"network" description:"network to run on" choice:"regtest" choice:"testnet" choice:"mainnet" choice:"simnet"`
|
||||
|
|
@ -60,8 +60,8 @@ const (
|
|||
)
|
||||
|
||||
// DefaultConfig returns all default values for the Config struct.
|
||||
func DefaultConfig() config {
|
||||
return config{
|
||||
func DefaultConfig() Config {
|
||||
return Config{
|
||||
Network: "mainnet",
|
||||
RPCListen: "localhost:11010",
|
||||
RESTListen: "localhost:8081",
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ type listenerCfg struct {
|
|||
|
||||
// daemon runs loopd in daemon mode. It will listen for grpc connections,
|
||||
// execute commands and pass back swap status information.
|
||||
func daemon(config *config, lisCfg *listenerCfg) error {
|
||||
func daemon(config *Config, lisCfg *listenerCfg) error {
|
||||
lnd, err := lisCfg.getLnd(config.Network, config.Lnd)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ type RPCConfig struct {
|
|||
|
||||
// newListenerCfg creates and returns a new listenerCfg from the passed config
|
||||
// and RPCConfig.
|
||||
func newListenerCfg(config *config, rpcCfg RPCConfig) *listenerCfg {
|
||||
func newListenerCfg(config *Config, rpcCfg RPCConfig) *listenerCfg {
|
||||
return &listenerCfg{
|
||||
grpcListener: func() (net.Listener, error) {
|
||||
// If a custom RPC listener is set, we will listen on
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
)
|
||||
|
||||
// getClient returns an instance of the swap client.
|
||||
func getClient(config *config, lnd *lndclient.LndServices) (*loop.Client,
|
||||
func getClient(config *Config, lnd *lndclient.LndServices) (*loop.Client,
|
||||
func(), error) {
|
||||
|
||||
storeDir, err := getStoreDir(config.Network)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
)
|
||||
|
||||
// view prints all swaps currently in the database.
|
||||
func view(config *config, lisCfg *listenerCfg) error {
|
||||
func view(config *Config, lisCfg *listenerCfg) error {
|
||||
chainParams, err := swap.ChainParamsFromNetwork(config.Network)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue