@@ -47,6 +47,8 @@ function startBlockingProcess(name, args, logger) {
4747
4848module . exports . startLndProcess = async function ( {
4949 isDev,
50+ rpcUser,
51+ rpcPass,
5052 macaroonsEnabled,
5153 lndSettingsDir,
5254 lndPort,
@@ -55,16 +57,17 @@ module.exports.startLndProcess = async function({
5557 lndRestPort,
5658} ) {
5759 if ( ! lndSettingsDir ) throw new Error ( 'lndSettingsDir not set!' ) ;
60+ const rpc = ! ! rpcUser ;
5861 const processName = 'lnd' ;
5962 const args = [
6063 '--bitcoin.active' ,
6164 isDev ? '--bitcoin.simnet' : '--bitcoin.testnet' ,
62- isDev ? ' --btcd.rpcuser=kek' : '' ,
63- isDev ? ' --btcd.rpcpass=kek' : '' ,
64- isDev ? '--bitcoin.node=btcd' : '--bitcoin.node=neutrino' ,
65- isDev ? '' : `--configfile=${ path . join ( lndSettingsDir , 'lnd.conf' ) } ` ,
66- isDev ? '' : '--neutrino.connect=btcd0.lightning.engineering' ,
67- isDev ? '' : '--neutrino.connect=127.0.0.1:18333' ,
65+ isDev || rpcUser ? ` --btcd.rpcuser=${ rpcUser || ' kek'} ` : '' ,
66+ isDev || rpcPass ? ` --btcd.rpcpass=${ rpcPass || ' kek'} ` : '' ,
67+ isDev || rpc ? '--bitcoin.node=btcd' : '--bitcoin.node=neutrino' ,
68+ isDev || rpc ? '' : `--configfile=${ path . join ( lndSettingsDir , 'lnd.conf' ) } ` ,
69+ isDev || rpc ? '' : '--neutrino.connect=btcd0.lightning.engineering' ,
70+ isDev || rpc ? '' : '--neutrino.connect=127.0.0.1:18333' ,
6871 isDev ? '' : '--autopilot.active' ,
6972
7073 macaroonsEnabled ? '' : '--no-macaroons' ,
0 commit comments