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

Missing way to verify some mathematical functions #438

Open
wmanshu opened this issue Jul 29, 2019 · 0 comments
Open

Missing way to verify some mathematical functions #438

wmanshu opened this issue Jul 29, 2019 · 0 comments

Comments

@wmanshu
Copy link

wmanshu commented Jul 29, 2019

In the same MajorityWithdraw.flint file, this get

  public func getResult() -> Bool
  // post (returning (r,  ##r is the percentage of votes))
  {
    var count: Int = 0
    for let p: Address in participants {
      if participantVotes[p] {
        count += 1
      }
    }
    return (count * 100 / numParticipants) >= 50
  }

The value of variable count accumulates when after the loop, but our verification tool not yet has a way to verify this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants