Skip to content

Commit acf99eb

Browse files
committed
Update 2025-10 - Bugfix for BulkVoting
Small Bugfix in script 24b for BulkVoting
1 parent 394d21a commit acf99eb

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

cardano/mainnet/24b_regVote.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,14 @@ for (( tmpCnt=2; tmpCnt<${paramCnt}; tmpCnt++ ))
189189
if [[ $? -ne 0 ]]; then echo -e "\n\e[35mERROR - Could not read in Vote-File '${metafile}' !\n\e[0m"; exit 1; fi
190190
echo -e "\e[0mReading Vote-File: \e[32m${metafile}\e[0m"
191191

192-
#Read the values of the voting file generated by 'governance vote view'
192+
#Read the values of the voting file
193193
{ read voteActionVoter;
194194
read voteActionID;
195195
read voteActionAnchorHASH;
196196
read voteActionAnchorURL;
197197
read voteActionAnswer;
198198
} <<< $(jq -r "to_entries | (.[0].key // \"-\", (.[0].value | to_entries | (.[0].key // \"-\", .[0].value.anchor.dataHash // \"-\", .[0].value.anchor.url // \"-\", .[0].value.decision // \"-\" )))" <<< "${voteJSON}")
199199

200-
#Get action-title
201-
voteActionTitle=$(jq -r ".description // \"\"" "${metafile}" 2> /dev/null);
202-
if [[ "${voteActionTitle}" != "" ]]; then echo -e "\e[0m Description: \e[36m${voteActionTitle}"; fi
203-
204200
#Get voteType
205201
case ${voteActionVoter%%-*} in
206202
"committee") voteType="Committee";;
@@ -240,8 +236,8 @@ for (( tmpCnt=2; tmpCnt<${paramCnt}; tmpCnt++ ))
240236
fi
241237

242238
#Check that the action-id was not included before. Only one vote-file for one action-id allowed.
243-
if [[ "${actionIdCollector}" == *"${voteActionUTXO}#${voteActionIdx}"* ]]; then echo -e "\n\e[91mERROR - The Action-ID '${voteActionUTXO}#${voteActionIdx}' was already included before.\nOnly one vote for one Action-ID allowed!\n\e[0m"; exit 1; fi
244-
actionIdCollector+="${voteActionUTXO}#${voteActionIdx} " #add the current action-id to the collector
239+
if [[ "${actionIdCollector}" == *"${voteActionUTXO}#${voteActionIdx},"* ]]; then echo -e "\n\e[91mERROR - The Action-ID '${voteActionUTXO}#${voteActionIdx}' was already included before.\nOnly one vote for one Action-ID allowed!\n\e[0m"; exit 1; fi
240+
actionIdCollector+="${voteActionUTXO}#${voteActionIdx}, " #add the current action-id to the collector
245241

246242
echo
247243
votefileParameter+="--vote-file ${metafile} ";

cardano/mainnet/sha256sum_sposcripts.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ b5840cb93c592ea51b4f253cdd7d0643c610d03cdb2decd94a3ce0e8d152d5d1 23c_regComAuth
4444
d7d4753a6066fd792d9b46238c4cfe365e0ba342b3bdf891048f8795df8962cd 23d_checkComOnChain.sh
4545
18cb3611f363ac081280e52cefffe47eaa7b9038f281acee9517fe62287633b1 23e_retComColdKeys.sh
4646
12b6d56db067b4f8ca47ab9cba24997fabfa3a0b3dad1a4aa2caac3b8a8be321 24a_genVote.sh
47-
9fe07dea03bb99096371c66186df1a5bf29861a4c4c5bd0a043c9e76564f9e5e 24b_regVote.sh
47+
4ba6a4e6bdab571335df54921de7b569aa6ddd475550607cbf3c50e69e6ac791 24b_regVote.sh
4848
946b897babf79e53ccbd24cd2afb541e0f908117bcf6635c780b841814c9351f 24c_queryVote.sh
4949
0004e496a15589cd01d936c70aef59b17aa378c8f64783789224d579f7a016a1 25a_genAction.sh
5050
087fae298f192aa01db38ac403227f12c33eed553e5594fc146d252e28afa0a7 25b_regAction.sh

cardano/testnet/24b_regVote.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,14 @@ for (( tmpCnt=2; tmpCnt<${paramCnt}; tmpCnt++ ))
189189
if [[ $? -ne 0 ]]; then echo -e "\n\e[35mERROR - Could not read in Vote-File '${metafile}' !\n\e[0m"; exit 1; fi
190190
echo -e "\e[0mReading Vote-File: \e[32m${metafile}\e[0m"
191191

192-
#Read the values of the voting file generated by 'governance vote view'
192+
#Read the values of the voting file
193193
{ read voteActionVoter;
194194
read voteActionID;
195195
read voteActionAnchorHASH;
196196
read voteActionAnchorURL;
197197
read voteActionAnswer;
198198
} <<< $(jq -r "to_entries | (.[0].key // \"-\", (.[0].value | to_entries | (.[0].key // \"-\", .[0].value.anchor.dataHash // \"-\", .[0].value.anchor.url // \"-\", .[0].value.decision // \"-\" )))" <<< "${voteJSON}")
199199

200-
#Get action-title
201-
voteActionTitle=$(jq -r ".description // \"\"" "${metafile}" 2> /dev/null);
202-
if [[ "${voteActionTitle}" != "" ]]; then echo -e "\e[0m Description: \e[36m${voteActionTitle}"; fi
203-
204200
#Get voteType
205201
case ${voteActionVoter%%-*} in
206202
"committee") voteType="Committee";;
@@ -240,8 +236,8 @@ for (( tmpCnt=2; tmpCnt<${paramCnt}; tmpCnt++ ))
240236
fi
241237

242238
#Check that the action-id was not included before. Only one vote-file for one action-id allowed.
243-
if [[ "${actionIdCollector}" == *"${voteActionUTXO}#${voteActionIdx}"* ]]; then echo -e "\n\e[91mERROR - The Action-ID '${voteActionUTXO}#${voteActionIdx}' was already included before.\nOnly one vote for one Action-ID allowed!\n\e[0m"; exit 1; fi
244-
actionIdCollector+="${voteActionUTXO}#${voteActionIdx} " #add the current action-id to the collector
239+
if [[ "${actionIdCollector}" == *"${voteActionUTXO}#${voteActionIdx},"* ]]; then echo -e "\n\e[91mERROR - The Action-ID '${voteActionUTXO}#${voteActionIdx}' was already included before.\nOnly one vote for one Action-ID allowed!\n\e[0m"; exit 1; fi
240+
actionIdCollector+="${voteActionUTXO}#${voteActionIdx}, " #add the current action-id to the collector
245241

246242
echo
247243
votefileParameter+="--vote-file ${metafile} ";

0 commit comments

Comments
 (0)