From 62aae1fc05d505446c9c90b95fb5049e7053f4e9 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Thu, 29 Aug 2024 05:45:23 -0400 Subject: [PATCH] chore(scripts): remove hardcoded height for arabica.sh (#3831) --- scripts/arabica.sh | 5 +++-- scripts/mocha.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/arabica.sh mode change 100644 => 100755 scripts/mocha.sh diff --git a/scripts/arabica.sh b/scripts/arabica.sh old mode 100644 new mode 100755 index 831c785245..fe88e26c89 --- a/scripts/arabica.sh +++ b/scripts/arabica.sh @@ -40,10 +40,11 @@ celestia-appd init ${NODE_NAME} --chain-id ${CHAIN_ID} > /dev/null 2>&1 # Hide o echo "Settings seeds in config.toml..." sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" $CELESTIA_APP_HOME/config/config.toml -# LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height); -BLOCK_HEIGHT=1751700 +LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height); +BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \ TRUST_HASH=$(curl -s "$RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) +echo "Latest height: $LATEST_HEIGHT" echo "Block height: $BLOCK_HEIGHT" echo "Trust hash: $TRUST_HASH" echo "Enabling state sync in config.toml..." diff --git a/scripts/mocha.sh b/scripts/mocha.sh old mode 100644 new mode 100755 index d64921b2a8..5447eb9e3b --- a/scripts/mocha.sh +++ b/scripts/mocha.sh @@ -44,6 +44,7 @@ LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height); BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \ TRUST_HASH=$(curl -s "$RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) +echo "Latest height: $LATEST_HEIGHT" echo "Block height: $BLOCK_HEIGHT" echo "Trust hash: $TRUST_HASH" echo "Enabling state sync in config.toml..."