Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge d16e360 into 6b7c04a
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyMow committed Aug 21, 2018
2 parents 6b7c04a + d16e360 commit 2c83133
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/lib/lnd/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 12 additions & 1 deletion app/lib/lnd/neutrino.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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 => {
Expand Down

0 comments on commit 2c83133

Please sign in to comment.