Skip to content

Commit

Permalink
Fix Mempool LN functionality (#2042)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmfretz authored Jan 10, 2025
1 parent 9783b97 commit 61def51
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mempool/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
BACKEND_MAINNET_HTTP_HOST: $APP_MEMPOOL_API_IP
NGINX_PORT: $APP_MEMPOOL_PORT
NGINX_HOSTNAME: $APP_MEMPOOL_API_IP
LIGHTNING_DETECTED_PORT: $APP_LIGHTNING_NODE_PORT
LIGHTNING_DETECTED_PORT: $APP_MEMPOOL_LIGHTNING_NODE_PORT
networks:
default:
ipv4_address: $APP_MEMPOOL_IP
Expand Down Expand Up @@ -56,7 +56,7 @@ services:
LIGHTNING_GRAPH_REFRESH_INTERVAL: 3600
LND_TLS_CERT_PATH: "/lnd/tls.cert"
LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/readonly.macaroon"
LND_REST_API_URL: "https://$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_REST_PORT"
LND_REST_API_URL: "https://$APP_MEMPOOL_LIGHTNING_NODE_IP:$APP_MEMPOOL_LIGHTNING_NODE_REST_PORT"
LND_TIMEOUT: 120000
NODE_OPTIONS: "--max-old-space-size=2048"
networks:
Expand Down
12 changes: 11 additions & 1 deletion mempool/exports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@ export APP_MEMPOOL_API_IP="10.21.21.27"
export APP_MEMPOOL_DB_IP="10.21.21.28"

hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}/hostname"
export APP_MEMPOOL_HIDDEN_SERVICE="$(cat "${hidden_service_file}" 2>/dev/null || echo "")"
export APP_MEMPOOL_HIDDEN_SERVICE="$(cat "${hidden_service_file}" 2>/dev/null || echo "")"

# Check if Lightning Node app is installed and export required variables if so
# The Lightning Node app is optional and not listed in the `required` field of the umbrel-app.yml file, so we need to do this for compatibility with umbrelOS >=1.3 where only exports of required apps are sourced.
installed_apps=$("${UMBREL_ROOT}/scripts/app" ls-installed)

if echo "$installed_apps" | grep --quiet 'lightning'; then
export APP_MEMPOOL_LIGHTNING_NODE_PORT="9735"
export APP_MEMPOOL_LIGHTNING_NODE_IP="10.21.21.9"
export APP_MEMPOOL_LIGHTNING_NODE_REST_PORT="8080"
fi
4 changes: 2 additions & 2 deletions mempool/umbrel-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ manifestVersion: 1
id: mempool
category: bitcoin
name: mempool
version: "3.0.1"
version: "3.0.1-hotfix"
tagline: Explore the full Bitcoin ecosystem
description: >-
Be your own explorer.
Expand All @@ -13,7 +13,7 @@ description: >-
This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com
releaseNotes: >-
This update brings faster block indexing and limits memory usage for better performance.
This update fixes an issue where users on umbrelOS 1.3 were unable to use optional LND functionality in the mempool app.
Full release notes for the previous major update to version 3.0.0 are found at https://github.com/mempool/mempool/releases
Expand Down

0 comments on commit 61def51

Please sign in to comment.