mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
main/lntest: factor out node config options, add options for bitcoind
This commit factors out the btcd and ltcd options into their own sections similar to neutrino, and adds a bitcoind section as well. Now, you specify node options similarly to: --ltcd.rpchost=... or --btcd.rpcuser=... or --bitcoind.zmqpath=... For Bitcoin, you specify an alternate back-end to btcd as follows: --bitcoin.node=bitcoind or --bitcoin.node=neutrino You can also specify the default option: --bitcoin.node=btcd For Litecoin, only `btcd` mode is valid, and corresponds to the `ltcd` section. For example: --litecoin.node=btcd --ltcd.rpchost=... The new code also attempts to read the correct options and auth info from bitcoin.conf just as it does from btcd.conf/ltcd.conf.
This commit is contained in:
@ -124,10 +124,10 @@ func (cfg nodeConfig) genArgs() []string {
|
||||
args = append(args, "--debuglevel=debug")
|
||||
args = append(args, "--bitcoin.defaultchanconfs=1")
|
||||
args = append(args, "--bitcoin.defaultremotedelay=4")
|
||||
args = append(args, fmt.Sprintf("--bitcoin.rpchost=%v", cfg.RPCConfig.Host))
|
||||
args = append(args, fmt.Sprintf("--bitcoin.rpcuser=%v", cfg.RPCConfig.User))
|
||||
args = append(args, fmt.Sprintf("--bitcoin.rpcpass=%v", cfg.RPCConfig.Pass))
|
||||
args = append(args, fmt.Sprintf("--bitcoin.rawrpccert=%v", encodedCert))
|
||||
args = append(args, fmt.Sprintf("--btcd.rpchost=%v", cfg.RPCConfig.Host))
|
||||
args = append(args, fmt.Sprintf("--btcd.rpcuser=%v", cfg.RPCConfig.User))
|
||||
args = append(args, fmt.Sprintf("--btcd.rpcpass=%v", cfg.RPCConfig.Pass))
|
||||
args = append(args, fmt.Sprintf("--btcd.rawrpccert=%v", encodedCert))
|
||||
args = append(args, fmt.Sprintf("--rpcport=%v", cfg.RPCPort))
|
||||
args = append(args, fmt.Sprintf("--peerport=%v", cfg.P2PPort))
|
||||
args = append(args, fmt.Sprintf("--logdir=%v", cfg.LogDir))
|
||||
|
Reference in New Issue
Block a user