Browse Source
feat(lnd): require explicit connection config
Do not assume that if the user has lnd running already on the localhost
we want to connect to it. Always ask the user for explicit connection
params.
renovate/lint-staged-8.x
Tom Kirkpatrick
7 years ago
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
2 changed files with
0 additions and
41 deletions
-
app/lnd/lib/util.js
-
yarn.lock
|
|
@ -2,7 +2,6 @@ import dns from 'dns' |
|
|
|
import fs from 'fs' |
|
|
|
import axios from 'axios' |
|
|
|
import { promisify } from 'util' |
|
|
|
import { lookup } from 'ps-node' |
|
|
|
import path from 'path' |
|
|
|
import grpc from 'grpc' |
|
|
|
import isIP from 'validator/lib/isIP' |
|
|
@ -138,27 +137,3 @@ export const createMacaroonCreds = async macaroonPath => { |
|
|
|
callback(null, metadata) |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Check to see if an LND process is running. |
|
|
|
* @return {Promise} Boolean indicating wether an existing lnd process was found on the host machine. |
|
|
|
*/ |
|
|
|
export const isLndRunning = () => { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
mainLog.info('Looking for existing lnd process') |
|
|
|
lookup({ command: 'lnd' }, (err, results) => { |
|
|
|
// There was an error checking for the LND process.
|
|
|
|
if (err) { |
|
|
|
return reject(err) |
|
|
|
} |
|
|
|
|
|
|
|
if (!results.length) { |
|
|
|
// An LND process was found, no need to start our own.
|
|
|
|
mainLog.info('Existing lnd process not found') |
|
|
|
return resolve(false) |
|
|
|
} |
|
|
|
mainLog.info('Found existing lnd process') |
|
|
|
return resolve(true) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
@ -3142,10 +3142,6 @@ connect-history-api-fallback@^1.5.0: |
|
|
|
version "1.5.0" |
|
|
|
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" |
|
|
|
|
|
|
|
connected-domain@^1.0.0: |
|
|
|
version "1.0.0" |
|
|
|
resolved "https://registry.yarnpkg.com/connected-domain/-/connected-domain-1.0.0.tgz#bfe77238c74be453a79f0cb6058deeb4f2358e93" |
|
|
|
|
|
|
|
console-browserify@1.1.x, console-browserify@^1.1.0: |
|
|
|
version "1.1.0" |
|
|
|
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" |
|
|
@ -9591,12 +9587,6 @@ prr@~1.0.1: |
|
|
|
version "1.0.1" |
|
|
|
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" |
|
|
|
|
|
|
|
ps-node@^0.1.6: |
|
|
|
version "0.1.6" |
|
|
|
resolved "https://registry.yarnpkg.com/ps-node/-/ps-node-0.1.6.tgz#9af67a99d7b1d0132e51a503099d38a8d2ace2c3" |
|
|
|
dependencies: |
|
|
|
table-parser "^0.1.3" |
|
|
|
|
|
|
|
pseudomap@^1.0.2: |
|
|
|
version "1.0.2" |
|
|
|
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" |
|
|
@ -11463,12 +11453,6 @@ symbol-tree@^3.2.1, symbol-tree@^3.2.2: |
|
|
|
version "3.2.2" |
|
|
|
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" |
|
|
|
|
|
|
|
table-parser@^0.1.3: |
|
|
|
version "0.1.3" |
|
|
|
resolved "https://registry.yarnpkg.com/table-parser/-/table-parser-0.1.3.tgz#0441cfce16a59481684c27d1b5a67ff15a43c7b0" |
|
|
|
dependencies: |
|
|
|
connected-domain "^1.0.0" |
|
|
|
|
|
|
|
table@^4.0.1: |
|
|
|
version "4.0.1" |
|
|
|
resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" |
|
|
|