Skip to content

Commit

Permalink
Change protocol version check for conway from 10 => 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Scitz0 committed Jul 31, 2024
1 parent b0164ca commit dbb8b87
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/cnode-helper-scripts/cncli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ getLedgerData() { # getNodeMetrics expected to have been already run

getConsensus() {
getProtocolParams
if versionCheck "10.0" "${PROT_VERSION}"; then
if versionCheck "9.0" "${PROT_VERSION}"; then
consensus="cpraos"
stability_window_factor=3
elif versionCheck "8.0" "${PROT_VERSION}"; then
Expand Down
4 changes: 2 additions & 2 deletions scripts/cnode-helper-scripts/cntools.library
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,7 @@ registerStakeWallet() {
stake_param=("--stake-verification-key-file" "${stake_vk_file}")
fi

if versionCheck "10.0" "${PROT_VERSION}"; then
if versionCheck "9.0" "${PROT_VERSION}"; then
stake_param+=("--key-reg-deposit-amt" ${KEY_DEPOSIT})
fi

Expand Down Expand Up @@ -2354,7 +2354,7 @@ deregisterStakeWallet() {
stake_param=("--stake-verification-key-file" "${stake_vk_file}")
fi

if versionCheck "10.0" "${PROT_VERSION}"; then
if versionCheck "9.0" "${PROT_VERSION}"; then
stake_param+=("--key-reg-deposit-amt" ${stake_deposit})
fi

Expand Down
12 changes: 6 additions & 6 deletions scripts/cnode-helper-scripts/cntools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ function main {
[[ -z ${reward_addr} ]] && println "\n${FG_YELLOW}INFO${NC}: '${FG_LGRAY}${WALLET_STAKE_ADDR_FILENAME}${NC}' missing and '${FG_LGRAY}${WALLET_STAKE_VK_FILENAME}${NC}' to generate it!"

drep_script_file="${WALLET_FOLDER}/${wallet_name}/${WALLET_GOV_DREP_SCRIPT_FILENAME}"
if [[ ${CNTOOLS_MODE} != "OFFLINE" && ! -f "${drep_script_file}" ]] && versionCheck "10.0" "${PROT_VERSION}"; then
if [[ ${CNTOOLS_MODE} != "OFFLINE" && ! -f "${drep_script_file}" ]] && versionCheck "9.0" "${PROT_VERSION}"; then
println "DEBUG" "\nGovernance Vote Delegation Status"
unset walletName
if getWalletVoteDelegation ${wallet_name}; then
Expand Down Expand Up @@ -3850,7 +3850,7 @@ function main {
println " >> VOTE >> GOVERNANCE >> INFO & STATUS"
println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo
if ! versionCheck "10.0" "${PROT_VERSION}"; then
if ! versionCheck "9.0" "${PROT_VERSION}"; then
println INFO "${FG_YELLOW}Not yet in Conway era, please revisit once network has crossed into Cardano governance era!${NC}"; waitToProceed && continue
fi
[[ ! $(ls -A "${WALLET_FOLDER}" 2>/dev/null) ]] && echo && println "${FG_YELLOW}No wallets available!${NC}" && waitToProceed && continue
Expand Down Expand Up @@ -3960,7 +3960,7 @@ function main {
println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
println " >> VOTE >> GOVERNANCE >> DELEGATE"
println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if ! versionCheck "10.0" "${PROT_VERSION}"; then
if ! versionCheck "9.0" "${PROT_VERSION}"; then
println INFO "\n${FG_YELLOW}Not yet in Conway era, please revisit once network has crossed into Cardano governance era!${NC}"; waitToProceed && continue
fi
if [[ ${CNTOOLS_MODE} = "OFFLINE" ]]; then
Expand Down Expand Up @@ -4154,7 +4154,7 @@ function main {
println " >> VOTE >> GOVERNANCE >> CAST VOTE"
println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo
if ! versionCheck "10.0" "${PROT_VERSION}"; then
if ! versionCheck "9.0" "${PROT_VERSION}"; then
println INFO "${FG_YELLOW}Not yet in Conway era, please revisit once network has crossed into Cardano governance era!${NC}"; waitToProceed && continue
fi
if [[ ${CNTOOLS_MODE} = "OFFLINE" ]]; then
Expand Down Expand Up @@ -4316,7 +4316,7 @@ function main {
println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
println " >> VOTE >> GOVERNANCE >> DREP REGISTRATION / UPDATE"
println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if ! versionCheck "10.0" "${PROT_VERSION}"; then
if ! versionCheck "9.0" "${PROT_VERSION}"; then
println INFO "\n${FG_YELLOW}Not yet in Conway era, please revisit once network has crossed into Cardano governance era!${NC}"; waitToProceed && continue
fi
if [[ ${CNTOOLS_MODE} = "OFFLINE" ]]; then
Expand Down Expand Up @@ -4433,7 +4433,7 @@ function main {
println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
println " >> VOTE >> GOVERNANCE >> DREP RETIRE"
println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if ! versionCheck "10.0" "${PROT_VERSION}"; then
if ! versionCheck "9.0" "${PROT_VERSION}"; then
println INFO "\n${FG_YELLOW}Not yet in Conway era, please revisit once network has crossed into Cardano governance era!${NC}"; waitToProceed && continue
fi
if [[ ${CNTOOLS_MODE} = "OFFLINE" ]]; then
Expand Down

0 comments on commit dbb8b87

Please sign in to comment.