Files
cyphernode/cyphernodeconf_docker/templates/lightning/c-lightning/config
2020-01-27 14:42:15 -05:00

45 lines
1.2 KiB
Plaintext

<% if (net === 'regtest') { %>
# regtest
network=regtest
<% } else if (net === 'testnet') { %>
# testnet
network=testnet
<% } else if (net === 'mainnet') { %>
network=bitcoin
<% } %>
<% if( lightning_nodename ) { %>
alias=<%= lightning_nodename %>
<% } %>
<% if( lightning_nodecolor ) { %>
rgb=<%= lightning_nodecolor %>
<% } %>
addr=0.0.0.0:9735
<% if ( features.indexOf('tor') !== -1 && torifyables && torifyables.indexOf('tor_lightning') !== -1 ) { %>
# Tor
# proxy=tor:9050 this has to be made at execution time because of getaddrinfo and alpine not being friends, see entrypoint.sh
<% if ( !clearnet || clearnet.indexOf('clearnet_lightning') === -1 ) { %>
# Tor only, no clearnet
always-use-proxy=true
disable-dns
<% } %>
<% if (lightning_announce) { %>
# Announcing Tor address
announce-addr=<%= locals.tor_lightning_hostname %>:9735
<% if ( clearnet && clearnet.indexOf('clearnet_lightning') !== -1 ) { %>
<% if( locals.lightning_external_ip ) { %>
# Announcing clearnet address
announce-addr=<%= locals.lightning_external_ip %>:9735
<% } %>
<% } %>
<% } %>
<% } else { %>
<% if (lightning_announce) { %>
<% if( locals.lightning_external_ip ) { %>
# Announcing clearnet address
announce-addr=<%= locals.lightning_external_ip %>:9735
<% } %>
<% } %>
<% } %>