Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[democracy] illegal votes can be placed even though the proposal should be voted on anymore #392

Closed
clangenb opened this issue Jun 2, 2024 · 0 comments · Fixed by #397
Closed
Assignees

Comments

@clangenb
Copy link
Member

clangenb commented Jun 2, 2024

Here, we see that the proposal state is updated after the new tally has been placed:

match Self::do_update_proposal_state(proposal_id) {
.

Wrong Behaviour:

  • If the proposal is too old, it gets cancelled, but the tally is still updated even though the vote didn't count anymore. However, the behaviour isn't wrong, except for that the turnout is one more than was counted, actually.
  • If the proposal is in confirming: Actual wrong behaviour. We count the vote even though we should first check if it is still passing and then maybe approve the proposal already. So the bug is that a Nay can put the proposal back to OnGoing even though it should have been approved.

Solution:

  • I suggest we should simply update the proposal state as a first step and only insert the new tally the proposal is OnGoing or Confirming and then we have to update the proposal state again.
@brenzi brenzi self-assigned this Jun 24, 2024
brenzi added a commit that referenced this issue Jun 24, 2024
@brenzi brenzi closed this as completed in 9e700c8 Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants