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

Commit

Permalink
Merge 055da5f into 41c9be4
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulbile committed Aug 15, 2021
2 parents 41c9be4 + 055da5f commit 4e2a78a
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 153 deletions.
2 changes: 1 addition & 1 deletion config/default.js
Expand Up @@ -83,9 +83,9 @@ module.exports = {
testnet: ['testnet3-btcd.zaphq.io', 'testnet4-btcd.zaphq.io'],
mainnet: ['mainnet3-btcd.zaphq.io', 'mainnet4-btcd.zaphq.io'],
},
validateChannels: false,
},

assumechanvalid: true,
recoveryWindow: 2500,
whitelistPeers: false,
},
Expand Down
11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -44,8 +44,7 @@
},
"config": {
"lnd-binary": {
"binaryVersion": "0.12.0-beta-2-g2dd779205",
"binarySite": "https://github.com/LN-Zap/lnd/releases/download"
"binaryVersion": "0.13.1-beta"
}
},
"browserslist": [
Expand Down Expand Up @@ -255,7 +254,7 @@
"cross-env": "7.0.2",
"cross-spawn": "7.0.3",
"csp-html-webpack-plugin": "4.0.0",
"electron": "9.4.0",
"electron": "9.4.4",
"electron-builder": "22.9.1",
"electron-devtools-installer": "3.1.1",
"electron-notarize": "1.0.0",
Expand Down Expand Up @@ -288,7 +287,7 @@
"husky": "4.3.0",
"jest": "26.5.3",
"jest-styled-components": "6.3.4",
"lnd-binary": "0.3.18",
"lnd-binary": "0.3.22",
"minimist": "1.2.5",
"mock-spawn": "0.2.6",
"native-ext-loader": "2.3.0",
Expand Down Expand Up @@ -324,7 +323,7 @@
"@ln-zap/bolt11": "1.2.8-beta.3",
"@rebass/forms": "4.0.6",
"@styled-system/theme-get": "5.1.2",
"axios": "0.19.2",
"axios": "0.21.1",
"bech32": "1.1.4",
"bignumber.js": "9.0.1",
"bip21": "2.0.3",
Expand Down Expand Up @@ -352,7 +351,7 @@
"is-electron-renderer": "2.0.1",
"jstimezonedetect": "1.0.7",
"keytar": "5.6.0",
"lnd-grpc": "0.4.8",
"lnd-grpc": "0.5.0",
"lndconnect": "0.2.10",
"lodash": "4.17.21",
"new-github-issue-url": "0.2.1",
Expand Down
19 changes: 3 additions & 16 deletions services/neutrino/neutrino.js
Expand Up @@ -302,7 +302,6 @@ class Neutrino extends EventEmitter {
`--restlisten=${restlisten}`,
'--accept-keysend',
'--protocol.wumbo-channels',
`${this.lndConfig.assumechanvalid ? '--routing.assumechanvalid' : ''}`,
`${this.lndConfig.alias ? `--alias=${this.lndConfig.alias}` : ''}`,
...autopilotArgs,
...neutrinoArgs,
Expand Down Expand Up @@ -378,6 +377,8 @@ class Neutrino extends EventEmitter {
neutrinoArgs.push('--neutrino.useragentname=zap-desktop')
neutrinoArgs.push(`--neutrino.useragentversion=${getPackageDetails().version}`)
neutrinoArgs.push(`--neutrino.feeurl=${feeUrl}`)
neutrinoArgs.push(`
${config.lnd.neutrino.validateChannels ? `--neutrino.validatechannels` : ''}`)
neutrinoArgs.push(`--${chain}.${network}`)
nodes.forEach(node => neutrinoArgs.push(`--neutrino.${connectFlag}=${node}`))

Expand Down Expand Up @@ -431,7 +432,6 @@ class Neutrino extends EventEmitter {
stdout.pipe(split2()).on('data', line => {
this.handleErrors(line)
this.notifyOnWalletUnlockerActivation(line)
this.notifyLightningActivation(line)

// If the sync has already completed then we don't need to do any more log processing.
if (this.is(NEUTRINO_CHAIN_SYNC_COMPLETE)) {
Expand Down Expand Up @@ -486,26 +486,13 @@ class Neutrino extends EventEmitter {
* @param {string} line log output line
*/
notifyOnWalletUnlockerActivation(line) {
if (line.includes('RPC server listening on') && line.toLowerCase().includes('password')) {
if (line.includes('Waiting for wallet encryption password')) {
this.isWalletUnlockerGrpcActive = true
this.isLightningGrpcActive = false
this.emit(NEUTRINO_WALLET_UNLOCKER_GRPC_ACTIVE)
}
}

/**
* notifyLightningActivation - Update state if log line indicates Lightning gRPC became active.
*
* @param {string} line log output line
*/
notifyLightningActivation(line) {
if (line.includes('RPC server listening on') && !line.toLowerCase().includes('password')) {
this.isLightningGrpcActive = true
this.isWalletUnlockerGrpcActive = false
this.emit(NEUTRINO_LIGHTNING_GRPC_ACTIVE)
}
}

/**
* notifyOnSyncWaiting - Update state if log line indicates we are waiting to sync.
*
Expand Down
2 changes: 0 additions & 2 deletions utils/lndConfig.js
Expand Up @@ -147,7 +147,6 @@ class LndConfig {
allocation: autopilotAllocation,
minconfs: autopilotMinconfs,
},
assumechanvalid,
whitelistPeers,
} = config.lnd

Expand All @@ -162,7 +161,6 @@ class LndConfig {
autopilotMaxchansize,
autopilotAllocation,
autopilotMinconfs,
assumechanvalid,
whitelistPeers,
}
// Merge in whitelisted settings.
Expand Down

0 comments on commit 4e2a78a

Please sign in to comment.