Skip to content

Fix/Validate Dispute Votes - #1061

Merged
danflo27 merged 12 commits into
mainfrom
fix/dispute-vote-counting
Aug 21, 2026
Merged

Fix/Validate Dispute Votes#1061
danflo27 merged 12 commits into
mainfrom
fix/dispute-vote-counting

Conversation

@CJPotter10

Copy link
Copy Markdown
Contributor

Description

Validate Vote option to ensure that it is a valid enum option and when updating vote power we do not attribute all bug votes as invalid. Also fixed a bug where if a non reporter selector voted more than once on a dispute that it would continue to subtract the reporter vote power more than it needs to

Related Issue

Fixes #

Type of Change

  • [ x Bug fix
  • New feature
  • Documentation update
  • State Changes (please describe)"
  • [ x ] Chain Changes (please describe): small logic changes to dispute voting power calculation/tracking
  • Daemon Changes
  • Tests
  • Added Getter

Testing

all existing dispute tests

Checklist

  • [ x ] Code follows project style guidelines
  • [ x ] I have added appropriate comments to my code
  • [ x ] I have updated the documentation accordingly
  • [ x ] I have added tests that prove my fix or feature works
  • [ x ] go test ./... is passing locally
  • [ x ] make e2e is passing locally

…choice and then also when counting vote power we do not let everything but against and support being counted as invalid
@danflo27
danflo27 merged commit 50d81a1 into main Aug 21, 2026
48 of 49 checks passed
@danflo27
danflo27 deleted the fix/dispute-vote-counting branch August 21, 2026 14:13
danflo27 added a commit that referenced this pull request Aug 21, 2026
* made it so that it validates the vote choice to ensure it is a valid choice and then also when counting vote power we do not let everything but against and support being counted as invalid

* addressed a vote accounting bug

* strengthened testing around edge case dispute voting

* refactored logic with voting on disputes. Tried to cleanup the changes and make it more simple

* extended the new voting logic and safeguards to the SetTeamVote function

* fixed test that was failing

* made lint fixes

* lint fix

---------


(cherry picked from commit 50d81a1)

Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
Co-authored-by: Dan F <florentinodc@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants