The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/rosetta/infra/run.sh

39 lines
913 B

#!/usr/bin/env bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
DATA="$DIR/data"
LOGS="$DATA/logs"
8 months ago
DATA_NAME="${DATA_NAME:=woop_sharddb_0}"
8 months ago
MAINNET_22816573_SNAPSHOT="release:pub.wikiwoop.com/mainnet.min.22816573/woop_sharddb_0"
case "$NETWORK" in
mainnet)
8 months ago
CONFIG_PATH="-c /root/woop-mainnet.conf"
;;
mainnet-22816573)
8 months ago
CONFIG_PATH="-c /root/woop-mainnet.conf"
rclone -P -L sync $MAINNET_22816573_SNAPSHOT $DATA/$DATA_NAME --transfers=64
;;
testnet)
8 months ago
CONFIG_PATH="-c /root/woop-pstn.conf"
;;
*)
echo "unknown network"
exit 1
;;
esac
if [ "$MODE" = "offline" ]; then
BASE_ARGS=(--datadir "$DATA" --log.dir "$LOGS" --run.offline)
else
BASE_ARGS=(--datadir "$DATA" --log.dir "$LOGS")
fi
mkdir -p "$LOGS"
echo -e NODE ARGS: \" $CONFIG_PATH "$@" "${BASE_ARGS[@]}" \"
8 months ago
echo "NODE VERSION: $($DIR/woop --version)"
8 months ago
"$DIR/woop" $CONFIG_PATH "$@" "${BASE_ARGS[@]}"