From 2cdd481a6992dd75d54784f566e53c1f5ba16ff4 Mon Sep 17 00:00:00 2001 From: Manuel Date: Sat, 3 Aug 2024 19:33:25 +0000 Subject: [PATCH] updated processAllEpochs function to use epoch var from epoch list loop, instead of input "$1" --- scripts/cnode-helper-scripts/cncli.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/cnode-helper-scripts/cncli.sh b/scripts/cnode-helper-scripts/cncli.sh index fb8e5493f..989f554d9 100755 --- a/scripts/cnode-helper-scripts/cncli.sh +++ b/scripts/cnode-helper-scripts/cncli.sh @@ -865,14 +865,13 @@ processAllEpochs() { IFS=' ' read -r -a epochs_array <<< "$EPOCHS" for epoch in "${epochs_array[@]}"; do - set -- "$epoch" - if ! getConsensus "${1}"; then echo "ERROR: Failed to fetch protocol parameters for epoch ${1}."; return 1; fi - if [[ "$1" == "$curr_epoch" ]]; then - runCurrentEpoch ${1} - elif [[ "$1" == "$next_epoch" ]]; then - runNextEpoch ${1} + if ! getConsensus "${epoch}"; then echo "ERROR: Failed to fetch protocol parameters for epoch ${epoch}."; return 1; fi + if [[ "$epoch" == "$curr_epoch" ]]; then + runCurrentEpoch ${epoch} + elif [[ "$epoch" == "$next_epoch" ]]; then + runNextEpoch ${epoch} else - runPreviousEpochs ${1} + runPreviousEpochs ${epoch} fi done