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 #3812 from LN-Zap/feat/lnd-0.14.4
Browse files Browse the repository at this point in the history
Update to lnd 0.14.4
  • Loading branch information
mrfelton authored Feb 17, 2023
2 parents 928602b + 752ba06 commit 98c93f9
Show file tree
Hide file tree
Showing 6 changed files with 231 additions and 120 deletions.
4 changes: 2 additions & 2 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ module.exports = {

neutrino: {
bitcoin: {
testnet: ['testnet3-btcd.zaphq.io', 'testnet4-btcd.zaphq.io'],
mainnet: ['mainnet3-btcd.zaphq.io', 'mainnet4-btcd.zaphq.io'],
testnet: [],
mainnet: [],
},
validateChannels: false,
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"config": {
"lnd-binary": {
"binaryVersion": "0.14.1-beta"
"binaryVersion": "0.14.4-beta"
}
},
"browserslist": [
Expand Down Expand Up @@ -287,7 +287,7 @@
"husky": "4.3.0",
"jest": "26.5.3",
"jest-styled-components": "6.3.4",
"lnd-binary": "0.3.24",
"lnd-binary": "0.3.26",
"minimist": "1.2.5",
"mock-spawn": "0.2.6",
"native-ext-loader": "2.3.0",
Expand Down Expand Up @@ -351,7 +351,7 @@
"is-electron-renderer": "2.0.1",
"jstimezonedetect": "1.0.7",
"keytar": "5.6.0",
"lnd-grpc": "0.5.3",
"lnd-grpc": "0.5.4",
"lndconnect": "0.2.10",
"lodash": "4.17.21",
"new-github-issue-url": "0.2.1",
Expand Down
9 changes: 8 additions & 1 deletion renderer/components/Home/WalletSettingsFormLocal.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const sanitizeNeutrinoNodes = nodes =>
export const validateNeutrinoNodes = async formApi => {
const field = 'neutrinoNodes'
const value = sanitizeNeutrinoNodes(formApi.getValue(field))

if (!value) {
return
}
Expand Down Expand Up @@ -49,6 +50,10 @@ export const validateNeutrinoNodes = async formApi => {

// informed parser for neutrinoNodes field
const parseNeutrinoNodes = value => {
if (!value) {
return []
}

if (Array.isArray(value)) {
return value
}
Expand Down Expand Up @@ -97,6 +102,7 @@ class WalletSettingsFormLocal extends React.Component {
autopilotMinchansize,
autopilotMaxchansize,
autopilotAllocation,
neutrinoNodes,
} = wallet

return (
Expand Down Expand Up @@ -181,7 +187,8 @@ class WalletSettingsFormLocal extends React.Component {
field="neutrinoNodes"
format={formatNeutrinoNodes}
highlightOnValid={false}
initialValue={config.lnd.neutrino[chain][network]}
id="neutrinoNodes"
initialValue={neutrinoNodes || config.lnd.neutrino[chain][network]}
onBlur={this.validateHost}
onChange={this.validateHost}
parse={parseNeutrinoNodes}
Expand Down
5 changes: 2 additions & 3 deletions services/neutrino/neutrino.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,8 @@ class Neutrino extends EventEmitter {
line.match(/Syncing to block height (\d+)/) ||
line.match(/Starting cfilters sync at block_height=(\d+)/) ||
line.match(/Starting cfheaders sync from \(block_height=(\d+)/) ||
line.includes('Waiting for chain backend to finish sync') ||
line.includes('Waiting for block headers to sync, then will start cfheaders sync') ||
line.includes('Starting rescan from known block')
line.match(/Starting cfheaders sync from \(block_height=(\d+)/) ||
line.match(/Started rescan from block .* \(height (\d+)\)/)
if (match) {
this.setState(NEUTRINO_CHAIN_SYNC_IN_PROGRESS)

Expand Down
10 changes: 5 additions & 5 deletions utils/fetchBlockHeight.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ const fetchBlockHeight = (chain, network) => {
bitcoin: {
mainnet: [
{
baseUrl: `https://api.smartbit.com.au/v1/blockchain/blocks?limit=1`,
path: 'blocks[0].height',
baseUrl: 'https://chain.api.btc.com/v3/block/latest',
path: 'data.height',
},
{
baseUrl: `https://api.blockcypher.com/v1/btc/main`,
baseUrl: 'https://api.blockcypher.com/v1/btc/main',
path: 'height',
},
],
testnet: [
{
baseUrl: `https://testnet-api.smartbit.com.au/v1/blockchain/blocks?limit=1`,
baseUrl: 'https://testnet-api.smartbit.com.au/v1/blockchain/blocks?limit=1',
path: 'blocks[0].height',
},
{
baseUrl: `https://api.blockcypher.com/v1/btc/test3`,
baseUrl: 'https://api.blockcypher.com/v1/btc/test3',
path: 'height',
},
],
Expand Down
Loading

0 comments on commit 98c93f9

Please sign in to comment.