Skip to content

Commit

Permalink
Fix cncli version check
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Jan 11, 2024
1 parent 47fc431 commit ea5b048
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/cnode-helper-scripts/gLiveView.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ setTheme() {
# Do NOT modify code below #
######################################

GLV_VERSION=v1.28.3
GLV_VERSION=v1.28.4

PARENT="$(dirname $0)"

Expand Down Expand Up @@ -124,7 +124,7 @@ fi
if [[ ${UPDATE_CHECK} = Y && ${SKIP_UPDATE} != Y ]]; then

if command -v cncli >/dev/null && command -v systemctl >/dev/null && systemctl is-active --quiet ${CNODE_VNAME}-cncli-sync.service 2>/dev/null; then
vcur=$(cncli -V | sed 's/cncli /v/g')
vcur=$(cncli -V | awk '{print $2}')
vrem=$(curl -s https://api.github.com/repos/${G_ACCOUNT}/cncli/releases/latest | jq -r .tag_name)
[[ ${vcur} != ${vrem} ]] && printf "${FG_MAGENTA}CNCLI current version (${vcur}) different from repo (${vrem}), consider upgrading!.${NC}" && waitToProceed
fi
Expand Down
6 changes: 3 additions & 3 deletions scripts/grest-helper-scripts/grest-poll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function chk_cache_status() {
last_actvstake_epoch=$(jq -r 'map(select(.key == "last_active_stake_validated_epoch"))[0].last_value' 2>/dev/null <<< "${ctrl_tbl}")
last_snapshot_epoch=$(jq -r 'map(select(.key == "last_stake_snapshot_epoch"))[0].last_value' 2>/dev/null <<< "${ctrl_tbl}")
last_epoch_summary=$(jq -r 'map(select(.key == "last_epoch_summary_data_checked"))[0].last_value' 2>/dev/null <<< "${ctrl_tbl}")
if [[ "${last_stakedist_block}" == "" ]] || [[ "${last_stakedist_block}" == "[]" ]] || [[ $(( block_no - last_stakedist_block )) -gt 1000 ]]; then
if [[ "${last_stakedist_block}" == "" ]] || [[ "${last_stakedist_block}" == "[]" ]] || [[ $(( block_no - last_stakedist_block )) -gt 2000 ]]; then
log_err "Stake Distribution cache too far from tip !!"
optexit
fi
Expand All @@ -159,11 +159,11 @@ function chk_cache_status() {
epoch_length=$(jq -r .epochLength "${GENESIS_JSON}" 2>/dev/null)
if [[ ${epoch_slot} -ge $(( epoch_length / 6 )) ]]; then
if [[ "${last_actvstake_epoch}" != "${epoch}" ]]; then
log_err "Active Stake cache for epoch ${epoch} still not populated as of ${epoch_slot} slot, maximum tolerance was $(( epoch_length / 10 )) !!"
log_err "Active Stake cache for epoch ${epoch} still not populated as of ${epoch_slot} slot, maximum tolerance was $(( epoch_length / 6 )) !!"
optexit
fi
if [[ "last_epoch_summary" != "${epoch}" ]]; then
log_err "Epoch Summary Cache for epoch ${epoch} still not populated as of ${epoch_slot} slot, maximum tolerance was $(( epoch_length / 10 )) !!"
log_err "Epoch Summary Cache for epoch ${epoch} still not populated as of ${epoch_slot} slot, maximum tolerance was $(( epoch_length / 6 )) !!"
optexit
fi
else
Expand Down

0 comments on commit ea5b048

Please sign in to comment.