💡State Sync
sudo systemctl stop c4ed
c4ed unsafe-reset-all --home $HOME/.c4e-chainPEER="1b802d4616c1de3fa687ad0d671b1b9d64754a44@88.198.49.217:26156,3d75b4da612395d69ef58a0f6dbb851bd98c1962@185.144.99.246:26656,a9bdcae2527c4a27a6f4882e852329241a945699@46.4.81.204:30656,2f6141859c28c088514b46f7783509aeeb87553f@141.94.193.12:11656,bf78d9bd64cf7e83357966aa3b4ca19d996ef1ef@51.75.55.49:26656,e84d7bff6960e7b50ee8eba09ef6f25b0b0b30cc@95.214.53.105:56656,717c041cf112f778508033e99a16288ec9d034c8@95.217.35.186:60756,cff10605b619e5119a1c9d53397a798de8fbf83b@64.227.136.63:26656,770fc199534d3126ff336b93aaf643a80e12761a@185.169.252.22:26656,c37c30000caf21391e77a457f7721685e41bea42@195.3.223.221:26656,d4c6f17b49af7f96c587613cbdb6e41b179079c2@185.208.206.217:26656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEER\"/" $HOME/.c4e-chain/config/config.tomlRPC="https://chain4energy-rpc.stakeangle.com:443"
RECENT_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height)
TRUST_HEIGHT=$((RECENT_HEIGHT - 1000))
TRUST_HASH=$(curl -s "$RPC/block?height=$TRUST_HEIGHT" | jq -r .result.block_id.hash)
echo $RECENT_HEIGHT $TRUST_HEIGHT $TRUST_HASHsed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$RPC,$RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$TRUST_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.c4e-chain/config/config.tomlLast updated