Merge pull request #4083 from harmony-one/fixed_rosetta_config
fixed rosetta dockerfile and change formatpull/4086/head
commit
e780fa7d71
@ -1,17 +1,38 @@ |
|||||||
#!/usr/bin/env bash |
#!/usr/bin/env bash |
||||||
set -e |
set -e |
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" |
||||||
DATA="$DIR/data" |
DATA="$DIR/data" |
||||||
LOGS="$DATA/logs" |
LOGS="$DATA/logs" |
||||||
BASE_ARGS=(--http.ip "0.0.0.0" --ws.ip "0.0.0.0" --http.rosetta --node_type "explorer" --datadir "$DATA" --log.dir "$LOGS") |
DATA_NAME="${DATA_NAME:=harmony_sharddb_0}" |
||||||
DATA_NAME="${DATA_NAME:=harmony_db_0}" |
|
||||||
|
|
||||||
if [ -n "$RCLONE_DB_0_URL" ]; then |
MAINNET_22816573_SNAPSHOT="release:pub.harmony.one/mainnet.min.22816573/harmony_sharddb_0" |
||||||
rclone -P -L sync $RCLONE_DB_0_URL $DATA/$DATA_NAME --transfers=64 |
|
||||||
|
case "$NETWORK" in |
||||||
|
mainnet) |
||||||
|
CONFIG_PATH="-c /root/harmony-mainnet.conf" |
||||||
|
;; |
||||||
|
mainnet-22816573) |
||||||
|
CONFIG_PATH="-c /root/harmony-mainnet.conf" |
||||||
|
rclone -P -L sync $MAINNET_22816573_SNAPSHOT $DATA/$DATA_NAME --transfers=64 |
||||||
|
;; |
||||||
|
testnet) |
||||||
|
CONFIG_PATH="-c /root/harmony-pstn.conf" |
||||||
|
;; |
||||||
|
*) |
||||||
|
echo "unknown network" |
||||||
|
exit 1 |
||||||
|
;; |
||||||
|
esac |
||||||
|
|
||||||
|
if [ "$MODE" = "offline" ]; then |
||||||
|
BASE_ARGS=(--datadir "$DATA" --log.dir "$LOGS" --run.offline --dns.server false --dns.client false --sync.legacy.server false --sync.legacy.client false) |
||||||
|
else |
||||||
|
BASE_ARGS=(--datadir "$DATA" --log.dir "$LOGS") |
||||||
fi |
fi |
||||||
|
|
||||||
mkdir -p "$LOGS" |
mkdir -p "$LOGS" |
||||||
echo -e NODE ARGS: \" "$@" "${BASE_ARGS[@]}" \" |
echo -e NODE ARGS: \" $CONFIG_PATH "$@" "${BASE_ARGS[@]}" \" |
||||||
echo "NODE VERSION: $(./harmony --version)" |
echo "NODE VERSION: $($DIR/harmony --version)" |
||||||
"$DIR/harmony" "$@" "${BASE_ARGS[@]}" |
|
||||||
|
"$DIR/harmony" $CONFIG_PATH "$@" "${BASE_ARGS[@]}" |
||||||
|
Loading…
Reference in new issue