Skip to content

Commit ebd5daf

Browse files
committed
aa-592: checked voting type
1 parent 8986209 commit ebd5daf

File tree

2 files changed

+101
-98
lines changed

2 files changed

+101
-98
lines changed

src/system/contracts/UpdateSysParam.sim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ contract UpdateSysParam {
1919
if prev != "@1VotingDecisionCheck" {
2020
error LangRes("@1contract_start_votingdecisioncheck_only", "en")
2121
}
22-
$voting = DBFind("@1votings").Where({ecosystem:$ecosystem_id, id: $VotingId }).Columns("voting->type_decision,flags->success").Row()
22+
$voting = DBFind("@1votings").Where({ecosystem:$ecosystem_id, id: $VotingId }).Columns("voting->type_decision,flags->success,voting->type").Row()
23+
if Int($voting["voting.type"]) != 2 {
24+
error LangRes("@1voting_type_invalid", "en")
25+
}
2326
if Int($voting["voting.type_decision"]) != 4 {
2427
error LangRes("@1voting_error_decision", "en")
2528
}

0 commit comments

Comments
 (0)