Skip to content

Commit

Permalink
env: getPoolId - fallback to POOL_DIR if no args, closes #1706
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Nov 21, 2023
1 parent 886d1a0 commit 95bcf58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions scripts/cnode-helper-scripts/env
Original file line number Diff line number Diff line change
Expand Up @@ -717,12 +717,14 @@ kesExpiration() {
# Parameters : pool name > the name of the pool
# Return : populates ${pool_id} & ${pool_id_bech32}
getPoolID() {
pool_id_file="${POOL_FOLDER}/${1}/${POOL_ID_FILENAME}"
pool_id_bech32_file="${POOL_FOLDER}/${1}/${POOL_ID_FILENAME}-bech32"
local pool_dir
[[ -z "${1}" ]] && pool_dir="${POOL_DIR}" || pool_dir="${POOL_FOLDER}/${1}"
pool_id_file="${pool_dir}/${POOL_ID_FILENAME}"
pool_id_bech32_file="${pool_dir}/${POOL_ID_FILENAME}-bech32"
[[ -f ${pool_id_file} && -f ${pool_id_bech32_file} ]] && pool_id=$(cat ${pool_id_file}) && pool_id_bech32=$(cat ${pool_id_bech32_file}) && return 0
pool_id=""
pool_id_bech32=""
pool_coldkey_vk_file="${POOL_FOLDER}/${1}/${POOL_COLDKEY_VK_FILENAME}"
pool_coldkey_vk_file="${pool_dir}/${POOL_COLDKEY_VK_FILENAME}"
if [[ -f ${pool_coldkey_vk_file} ]]; then
println ACTION "${CCLI} stake-pool id --cold-verification-key-file ${pool_coldkey_vk_file} --output-format hex"
println ACTION "${CCLI} stake-pool id --cold-verification-key-file ${pool_coldkey_vk_file}"
Expand Down
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.0
GLV_VERSION=v1.28.1

PARENT="$(dirname $0)"

Expand Down Expand Up @@ -721,7 +721,7 @@ screen_upd_cnt=0
test_koios # KOIOS_API variable unset if check fails. Only tested once on startup.
pool_info_file=/dev/shm/pool_info
pool_info_error_file=/dev/shm/pool_info_error
[[ -n ${KOIOS_API} ]] && getPoolID ${POOL_NAME}
[[ -n ${KOIOS_API} ]] && getPoolID

getOpCert

Expand Down

0 comments on commit 95bcf58

Please sign in to comment.