Browse Source
enhance(lnd config): Move LND settings Zap uses into the local lnd.conf
This enables easy access to all lnd settings for development, and is a step
toward relying on an external configuration file that will be accessible to
users for whom the code is not.
renovate/lint-staged-8.x
Ben Woosley
7 years ago
No known key found for this signature in database
GPG Key ID: 6EE5F3785F78B345
4 changed files with
13 additions and
16 deletions
app/lnd/config/index.js
app/main.dev.js
package.json
resources/lnd.conf
@ -60,6 +60,7 @@ if (process.env.NODE_ENV === 'development') {
export default {
lnd : ( ) => ( {
lndPath ,
configPath : join ( appRootPath , 'resources' , 'lnd.conf' ) ,
lightningRpc : join ( appRootPath , 'resources' , 'rpc.proto' ) ,
lightningHost : store . get ( 'host' ) || 'localhost:10009' ,
cert : store . get ( 'cert' ) || join ( userInfo ( ) . homedir , loc ) ,
@ -154,16 +154,7 @@ const startLnd = (alias, autopilot) => {
mainLog . debug ( ' > cert:' , lndConfig . cert )
mainLog . debug ( ' > macaroon:' , lndConfig . macaroon )
const neutrinoArgs = [
'--bitcoin.active' ,
'--bitcoin.testnet' ,
'--bitcoin.node=neutrino' ,
'--neutrino.connect=188.166.148.62' ,
'--neutrino.connect=127.0.0.1:18333' ,
'--debuglevel=debug' ,
` ${ autopilot ? '--autopilot.active' : '' } ` ,
` ${ alias ? ` --alias= ${ alias } ` : '' } `
]
const neutrinoArgs = [ ` --configfile= ${ lndConfig . configPath } ` , ` ${ autopilot ? '--autopilot.active' : '' } ` , ` ${ alias ? ` --alias= ${ alias } ` : '' } ` ]
const neutrino = spawn ( lndConfig . lndPath , neutrinoArgs )
. on ( 'error' , error => {
@ -88,6 +88,7 @@
"output" : "release"
} ,
"extraResources" : [
"resources/lnd.conf" ,
"resources/rpc.proto" ,
{
"from" : "resources/bin/${platform}" ,
@ -1,4 +1,6 @@
; Imported from https://github.com/lightningnetwork/lnd/blob/v0.4.2-beta/sample-lnd.conf
; updated to include default Zap settings
[Application Options]
; The directory that lnd stores all wallet, chain, and channel related data
@ -85,7 +87,7 @@
; You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set
; log level for individual subsystems. Use btcd --debuglevel=show to list
; available subsystems.
; debuglevel=info
debuglevel=debug
; Write CPU profile to the specified file.
; cpuprofile=
@ -123,22 +125,22 @@
bitcoin.active=1
; Use Bitcoin's test network.
; bitcoin.testnet=1
;
bitcoin.testnet=1
; Use Bitcoin's simulation test network
bitcoin.simnet=1
; bitcoin.simnet=1
; Use Bitcoin's regression test network
; bitcoin.regtest=false
; Use the btcd back-end
bitcoin.node=btcd
; bitcoin.node=btcd
; Use the bitcoind back-end
; bitcoin.node=bitcoind
; Use the neutrino (light client) back-end
; bitcoin.node=neutrino
bitcoin.node=neutrino
; The default number of confirmations a channel must have before it's considered
; open. We'll require any incoming channel requests to wait this many
@ -207,6 +209,8 @@ bitcoin.node=btcd
; Add a peer to connect with at startup.
; neutrino.addpeer=
neutrino.connect=188.166.148.62
neutrino.connect=127.0.0.1:18333
[Litecoin]