Skip to content

forge-governor — add test verifying abstain votes count toward quorum but not toward passing #335

@Austinaminu2

Description

@Austinaminu2

Summary

finalize() now includes abstentions in the quorum calculation:

let total_votes = proposal.votes_for + proposal.votes_against + proposal.abstentions;
if total_votes >= config.quorum && proposal.votes_for > proposal.votes_against {

There is no test explicitly verifying that a proposal can reach quorum purely via abstentions and then fail because votes_for does not exceed votes_against.

Tasks

  • Initialize with quorum = 100
  • Create a proposal, cast 100 abstain votes (meets quorum)
  • Cast 0 for/against votes
  • Call finalize() and assert state is Failed (quorum met but no majority)
  • Verify get_vote_tally() shows abstain_votes = 100, yes_votes = 0, no_votes = 0
  • Add a second scenario: 51 for + 49 abstain = 100 total (meets quorum, yes majority → Passed)

Labels: testing, forge-governor

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions