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

Commit

Permalink
Merge pull request #3761 from LN-Zap/next
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulbile authored Aug 15, 2021
2 parents 8e0499a + f2692b2 commit 33fc554
Show file tree
Hide file tree
Showing 5 changed files with 1,226 additions and 250 deletions.
2 changes: 1 addition & 1 deletion config/default.js
Original file line number Diff line number Diff line change
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
55 changes: 27 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
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 @@ -205,14 +204,14 @@
}
},
"devDependencies": {
"@babel/core": "7.11.6",
"@babel/plugin-proposal-class-properties": "7.10.4",
"@babel/plugin-proposal-export-default-from": "7.10.4",
"@babel/plugin-transform-react-constant-elements": "7.10.4",
"@babel/plugin-transform-react-inline-elements": "7.10.4",
"@babel/preset-env": "7.11.5",
"@babel/preset-react": "7.10.4",
"@babel/register": "7.11.5",
"@babel/core": "7.14.6",
"@babel/plugin-proposal-class-properties": "7.14.5",
"@babel/plugin-proposal-export-default-from": "7.14.5",
"@babel/plugin-transform-react-constant-elements": "7.14.5",
"@babel/plugin-transform-react-inline-elements": "7.14.5",
"@babel/preset-env": "7.14.7",
"@babel/preset-react": "7.14.5",
"@babel/register": "7.14.5",
"@commitlint/cli": "8.3.5",
"@commitlint/config-conventional": "8.3.4",
"@ln-zap/eslint-config": "0.3.2",
Expand All @@ -226,36 +225,36 @@
"@storybook/react": "5.3.18",
"@storybook/source-loader": "5.3.18",
"@svgr/cli": "4.3.3",
"@types/config": "0.0.36",
"@types/jstimezonedetect": "1.0.2",
"@types/react-dom": "16.9.8",
"@types/react-intl-redux": "0.1.14",
"@types/react-redux": "7.1.9",
"@types/react-router-dom": "5.1.6",
"@types/react-virtualized": "9.21.10",
"@types/rebass": "4.0.7",
"@types/redux-logger": "3.0.8",
"@types/config": "0.0.39",
"@types/jstimezonedetect": "1.0.3",
"@types/react-dom": "16.9.14",
"@types/react-intl-redux": "0.1.15",
"@types/react-redux": "7.1.18",
"@types/react-router-dom": "5.1.8",
"@types/react-virtualized": "9.21.12",
"@types/rebass": "4.0.9",
"@types/redux-logger": "3.0.9",
"@types/styled-system__theme-get": "5.0.1",
"add-asset-html-webpack-plugin": "3.1.3",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.1.0",
"babel-jest": "26.5.2",
"babel-loader": "8.1.0",
"babel-loader": "8.2.2",
"babel-plugin-module-resolver": "4.0.0",
"babel-plugin-react-intl": "7.5.4",
"babel-plugin-react-intl-auto": "3.3.0",
"babel-plugin-styled-components": "1.10.7",
"babel-plugin-transform-react-pure-class-to-function": "1.0.1",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"browserslist": "4.16.5",
"circular-dependency-plugin": "5.2.0",
"circular-dependency-plugin": "5.2.2",
"clean-webpack-plugin": "3.0.0",
"copy-webpack-plugin": "5.1.1",
"coveralls": "3.1.0",
"coveralls": "3.1.1",
"cross-env": "7.0.2",
"cross-spawn": "7.0.3",
"csp-html-webpack-plugin": "4.0.0",
"electron": "9.3.4",
"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 All @@ -337,7 +336,7 @@
"config": "3.3.2",
"copy-to-clipboard": "3.3.1",
"country-data-lookup": "0.0.33",
"debug": "4.1.1",
"debug": "4.3.2",
"debug-logger": "0.4.1",
"dexie": "3.0.2",
"downshift": "5.4.7",
Expand All @@ -352,9 +351,9 @@
"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.20",
"lodash": "4.17.21",
"new-github-issue-url": "0.2.1",
"node-fetch": "2.6.1",
"pdfmake": "0.1.65",
Expand Down
19 changes: 3 additions & 16 deletions services/neutrino/neutrino.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit 33fc554

Please sign in to comment.