diff --git a/app/lib/lnd/config.js b/app/lib/lnd/config.js index e61329fbb9b..edbd92f1ef0 100644 --- a/app/lib/lnd/config.js +++ b/app/lib/lnd/config.js @@ -276,7 +276,6 @@ class LndConfig { */ save() { const settings = pick(this, LndConfig.SETTINGS_PROPS[this.type]) - // Tildify cert and macaroon values before storing for better portability. if (settings.cert) { settings.cert = safeTildify(settings.cert) diff --git a/app/lib/lnd/neutrino.js b/app/lib/lnd/neutrino.js index f55997c0f6c..2254522b550 100644 --- a/app/lib/lnd/neutrino.js +++ b/app/lib/lnd/neutrino.js @@ -78,10 +78,20 @@ class Neutrino extends EventEmitter { const neutrinoArgs = [ `--configfile=${this.lndConfig.configPath}`, `--lnddir=${this.lndConfig.dataDir}`, - `${this.lndConfig.autopilot ? '--autopilot.active' : ''}`, `${this.lndConfig.alias ? `--alias=${this.lndConfig.alias}` : ''}` ] + // If the user toggled autopilot on let's enable it, + // make sure channels are private and allow it to use 0 conf txs + if (this.lndConfig.autopilot) { + // Turn autopilot on + neutrinoArgs.push('--autopilot.active') + // Ensure all channels opened by autopilot will be flagged private + neutrinoArgs.push('--autopilot.private') + // Allow autopilot to use 0 conf txs + neutrinoArgs.push('--autopilot.minconfs=0') + } + if (this.lndConfig.network === 'mainnet') { neutrinoArgs.push('--neutrino.connect=mainnet1-btcd.zaphq.io') // neutrinoArgs.push('--neutrino.connect=mainnet2-btcd.zaphq.io') @@ -90,6 +100,7 @@ class Neutrino extends EventEmitter { // neutrinoArgs.push('--neutrino.connect=testnet2-btcd.zaphq.io') } + // this.process = spawn(this.lndConfig.binaryPath, neutrinoArgs) this.process = spawn(this.lndConfig.binaryPath, neutrinoArgs) .on('error', error => this.emit(ERROR, error)) .on('close', code => {