Skip to content

Commit 6eee830

Browse files
committed
update websocket port handling
1 parent 3c2049e commit 6eee830

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

shutter/scripts/configure_keyper.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ NODE_PATH=$NODE_HOME/lib/node_modules
1414
PATH=$NODE_HOME/bin:$PATH
1515

1616
function test_ethereum_url() {
17-
# FIXME: This is a workaround for the issue with the [email protected] not setting get_execution_ws_url_from_global_env correctly in the environment variables.
18-
# Git Issue: https://github.com/dappnode/staker-package-scripts/issues/11
19-
export SHUTTER_NETWORK_NODE_ETHEREUMURL=${ETHEREUM_WS:-$(get_execution_ws_url_from_global_env ${NETWORK} ${SUPPORTED_NETWORKS})}
17+
if [ -z "$ETHEREUM_WS" ]; then
18+
export SHUTTER_NETWORK_NODE_ETHEREUMURL=$(get_execution_ws_url_from_global_env ${NETWORK})
19+
else
20+
export SHUTTER_NETWORK_NODE_ETHEREUMURL=$ETHEREUM_WS
21+
fi
2022
RESULT=$(wscat -c "$SHUTTER_NETWORK_NODE_ETHEREUMURL" -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}')
2123
if [[ $RESULT =~ '"id":1' ]]; then return 0; else
22-
export SHUTTER_NETWORK_NODE_ETHEREUMURL=ws://execution.${NETWORK}.dncore.dappnode:8545
24+
export SHUTTER_NETWORK_NODE_ETHEREUMURL=ws://execution.${NETWORK}.dncore.dappnode:8545 # fallback to old URL
2325
RESULT=$(wscat -c "$SHUTTER_NETWORK_NODE_ETHEREUMURL" -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}')
2426
if [[ $RESULT =~ '"id":1' ]]; then return 0; else
2527
echo "Could not find DAppNode RPC/WS url for this package!"

0 commit comments

Comments
 (0)