From ce170d1ad09b57144f0b2342d6584e529c78618e Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 16 Feb 2021 19:08:24 +0700 Subject: [PATCH] Onl set LND feeurl on Neutrino mainnet (#543) --- scripts/configure | 7 +++++++ templates/lnd-sample.conf | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/configure b/scripts/configure index 405b7bc..aca0bec 100755 --- a/scripts/configure +++ b/scripts/configure @@ -255,6 +255,12 @@ if [[ -f "${STATUS_DIR}/node-status-bitcoind-ready" ]]; then sed -i "s/bitcoin.node=.*/bitcoin.node=bitcoind/g;" "$LND_CONF_FILE" fi +# Set LND fee URL (but only for mainnet Neutrino) +LND_FEE_URL="" +if [[ "$BITCOIN_NETWORK" == "mainnet" ]] && [[ ! -f "${STATUS_DIR}/node-status-bitcoind-ready" ]]; then + LND_FEE_URL="https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json" +fi + # TODO: Update all the above code to use this simpler logic for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "${TOR_CONF_FILE}" "${ELECTRS_CONF_FILE}" "${ENV_FILE}"; do # Umbrel @@ -277,6 +283,7 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" " sed -i "s//${BITCOIN_ZMQ_RAWBLOCK_PORT}/g;" "${template}" sed -i "s//${BITCOIN_ZMQ_RAWTX_PORT}/g;" "${template}" sed -i "s//${BITCOIN_ZMQ_HASHBLOCK_PORT}/g;" "${template}" + sed -i "s##${LND_FEE_URL}#g;" "${template}" # Apps sed -i "s//${APP_BTC_RPC_EXPLORER_IP}/g" "${template}" diff --git a/templates/lnd-sample.conf b/templates/lnd-sample.conf index 6119c10..700b105 100644 --- a/templates/lnd-sample.conf +++ b/templates/lnd-sample.conf @@ -9,7 +9,7 @@ tlsextraip= tlsextradomain= tlsautorefresh=1 tlsdisableautofill=1 -feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json +feeurl= [Bitcoind] bitcoind.rpchost=