Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix retiring pool modification ability #1735

Merged
merged 3 commits into from
Feb 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions scripts/cnode-helper-scripts/cntools.library
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,8 @@ selectPool() {
0) println "ERROR" "KOIOS_API: ${error_msg}" &>/dev/null ;; # log error without printing but show pool
1) [[ ${mode} = "reg" ]] && continue ;;
2) [[ ${mode} = "non-reg" ]] && continue ;;
3) [[ ${mode} = "reg" ]] && continue ;;
3) [[ ${mode} = "non-reg" ]] && continue ;;
4) [[ ${mode} = "reg" ]] && continue ;;
esac
fi
pool_dirs+=("${dir}")
Expand All @@ -564,7 +565,8 @@ selectPool() {
# Return : 0 => error quering KOIOS API (error message saved in ${error_msg})
# 1 => NOT registered
# 2 => registered
# 3 => retiring/retired (only for KOIOS API)
# 3 => retiring (only for KOIOS API)
# 4 => retired (only for KOIOS API)
isPoolRegistered() {
unset error_msg pool_info pool_info_tsv pool_info_arr
unset p_active_epoch_no p_vrf_key_hash p_margin p_fixed_cost p_pledge p_reward_addr p_owners p_relays p_meta_url p_meta_hash p_meta_json p_pool_status
Expand Down Expand Up @@ -626,7 +628,8 @@ isPoolRegistered() {
p_live_delegators=${pool_info_arr[19]}
p_live_saturation=${pool_info_arr[20]}

[[ ${p_pool_status} = 'registered' ]] && return 2 || return 3
[[ ${p_pool_status} = 'registered' ]] && return 2
[[ ${p_pool_status} = 'retiring' ]] && return 3 || return 4
fi
}

Expand Down