Skip to content

Commit

Permalink
updated processAllEpochs function to use epoch var from epoch list lo…
Browse files Browse the repository at this point in the history
…op, instead of input "$1"
  • Loading branch information
Manuel committed Aug 3, 2024
1 parent 0b89e4f commit 2cdd481
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions scripts/cnode-helper-scripts/cncli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2cdd481

Please sign in to comment.