From 85a12393c9cafa40c71105824718b8075cab153a Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Sun, 12 May 2024 13:53:09 +0800 Subject: [PATCH] Update Artela.sh --- Artela.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Artela.sh b/Artela.sh index d480c95..b1c39f5 100644 --- a/Artela.sh +++ b/Artela.sh @@ -124,7 +124,9 @@ function install_node() { pm2 start artelad -- start && pm2 save && pm2 startup # 下载快照 - curl -L https://smeby.fun/artelad_snapshots.tar.lz4 | tar -I lz4 -xf - -C $HOME/.artelad/data + SNAP_NAME=$(curl -s https://ss-t.artela.nodestake.org/ | egrep -o ">20.*\.tar.lz4" | tr -d ">") + curl -o - -L https://ss-t.artela.nodestake.org/${SNAP_NAME} | lz4 -c -d - | tar -x -C $HOME/.artelad + mv $HOME/.artelad/priv_validator_state.json.backup $HOME/.artelad/data/priv_validator_state.json # 使用 PM2 启动节点进程