Skip to content

Commit

Permalink
Set chain file conditionally based on network
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum committed Apr 23, 2024
1 parent 9051fed commit fb2f456
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/run/subtensor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ function run_command()
if [[ "$F_NETWORK" == "mainnet" ]] && [[ "$F_NODE_TYPE" == "archive" ]]; then
SPECIFIC_OPTIONS=$MAINNET_ARCHIVE_OPTIONS
elif [[ "$F_NETWORK" == "mainnet" ]] && [[ "$F_NODE_TYPE" == "lite" ]]; then
SPECIFIC_OPTIONS=$MAINNET_LITE_OPTIONS
SPECIFIC_OPTIONS=$MAINNET_LITE_OPTIONS
elif [[ "$F_NETWORK" == "testnet" ]] && [[ "$F_NODE_TYPE" == "archive" ]]; then
SPECIFIC_OPTIONS=$TESTNET_ARCHIVE_OPTIONS
SPECIFIC_OPTIONS=$TESTNET_ARCHIVE_OPTIONS
elif [[ "$F_NETWORK" == "testnet" ]] && [[ "$F_NODE_TYPE" == "lite" ]]; then
SPECIFIC_OPTIONS=$TESTNET_LITE_OPTIONS
SPECIFIC_OPTIONS=$TESTNET_LITE_OPTIONS
fi

if [ ! -f $F_BIN_PATH ]; then
Expand All @@ -39,10 +39,16 @@ function run_command()
exit 1
fi

if [[ "$F_NETWORK" == "testnet" ]]; then
CHAIN_FILE="./raw_testspec.json"
else
CHAIN_FILE="./raw_spec.json"
fi

# Command to run subtensor
$F_BIN_PATH \
--base-path /tmp/blockchain \
--chain ./raw_spec.json \
--chain $CHAIN_FILE \
--rpc-external --rpc-cors all \
--ws-external --no-mdns \
--ws-max-connections 10000 --in-peers 500 --out-peers 500 \
Expand Down

0 comments on commit fb2f456

Please sign in to comment.