diff --git a/bitcoin/exports.sh b/bitcoin/exports.sh index 7c0f45e..643c4c0 100644 --- a/bitcoin/exports.sh +++ b/bitcoin/exports.sh @@ -82,4 +82,10 @@ export APP_BITCOIN_COMMAND=$(IFS=" "; echo "${BIN_ARGS[@]}") rpc_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-rpc/hostname" p2p_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-p2p/hostname" export APP_BITCOIN_RPC_HIDDEN_SERVICE="$(cat "${rpc_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" -export APP_BITCOIN_P2P_HIDDEN_SERVICE="$(cat "${p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" \ No newline at end of file +export APP_BITCOIN_P2P_HIDDEN_SERVICE="$(cat "${p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" + +# electrs compatible network param +export APP_BITCOIN_NETWORK_ELECTRS=$APP_BITCOIN_NETWORK +if [[ "${APP_BITCOIN_NETWORK_ELECTRS}" = "mainnet" ]]; then + APP_BITCOIN_NETWORK_ELECTRS="bitcoin" +fi \ No newline at end of file diff --git a/electrs/docker-compose.yml b/electrs/docker-compose.yml index 2f130e2..29b0016 100644 --- a/electrs/docker-compose.yml +++ b/electrs/docker-compose.yml @@ -27,7 +27,7 @@ services: restart: always environment: ELECTRS_LOG_FILTERS: "INFO" - ELECTRS_NETWORK: "${APP_BITCOIN_NETWORK}" + ELECTRS_NETWORK: "${APP_BITCOIN_NETWORK_ELECTRS}" ELECTRS_DAEMON_RPC_ADDR: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}" ELECTRS_DAEMON_P2P_ADDR: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_P2P_PORT}" ELECTRS_ELECTRUM_RPC_ADDR: "0.0.0.0:${APP_ELECTRS_NODE_PORT}"