Skip to content

Add regression test for governance poll vote weight updating correctly when voter changes their vote #539

Description

@Chucks1093

Summary

A holder who changes their vote before a poll expires must have their weight removed from the previous option and added to the new one. A regression test should confirm the tally is updated correctly without double-counting.

Scope

  • Create a poll with two options
  • Wallet A votes for option 0 with a balance of 10 keys
  • Wallet A changes their vote to option 1
  • Assert option 0 tally decreased by 10 and option 1 tally increased by 10
  • Assert total vote weight across all options remains unchanged

Acceptance Criteria

  • Option 0 tally decremented after vote change
  • Option 1 tally incremented after vote change
  • Total vote weight unchanged after the change
  • No double-counting of the voter's weight

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions