From c808f5178c223f83420955f94fcc6d4e01c77f1a Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Fri, 28 Jun 2024 22:23:40 +0800 Subject: [PATCH] Update new-titan.sh --- new-titan.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/new-titan.sh b/new-titan.sh index 642c011..b80bd0d 100644 --- a/new-titan.sh +++ b/new-titan.sh @@ -119,6 +119,15 @@ function install_node() { source $HOME/.bash_profile pm2 start titand -- start && pm2 save && pm2 startup + + # 下载快照 + titand tendermint unsafe-reset-all --home $HOME/.artelad --keep-addr-book + curl https://snapshots.dadunode.com/titan/titan_latest_tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.titan/data + mv $HOME/.titan/priv_validator_state.json.backup $HOME/.titan/data/priv_validator_state.json + + # 使用 PM2 启动节点进程 + + pm2 restart artelad echo '====================== 安装完成,请退出脚本后执行 source $HOME/.bash_profile 以加载环境变量 ==========================='