Update 0g.sh

This commit is contained in:
smeb y 2024-05-12 23:41:20 +08:00 committed by GitHub
parent 570e358814
commit c1edbe8ea4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

6
0g.sh
View File

@ -102,9 +102,9 @@ function install_node() {
pm2 start 0gchaind -- start && pm2 save && pm2 startup
pm2 stop 0gchaind
curl -L https://smeby.fun/0gchaind_snapshots.tar.lz4 | tar -I lz4 -xf - -C $HOME/.0gchain/data
mv $HOME/.0gchain/priv_validator_state.json.backup $HOME/.0gchain/data/priv_validator_state.json
SNAP_NAME=$(curl -s https://testnet.anatolianteam.com/0g/ | egrep -o ">zgtendermint_16600-1.*\.tar.lz4" | tr -d ">")
curl -L https://testnet.anatolianteam.com/0g/${SNAP_NAME} | tar -I lz4 -xf - -C $HOME/.0gchain
mv $HOME/.0gchain/priv_validator_state.json.backup $HOME/.0gchain/data/priv_validator_state.json
pm2 restart 0gchaind