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

prevent the same person from upvoting or downvoting the same article more than once #17

Open
Thesephi opened this issue Mar 27, 2022 · 5 comments
Labels

Comments

@Thesephi
Copy link
Collaborator

No description provided.

@khanetor
Copy link
Owner

Maybe a solution is to keep track of who upvotes and who downvotes instead of the count?

@khanetor
Copy link
Owner

Also this may not be needed for the demo, because it would be a hassle to have to create many accounts for testing.
We can assume that a person will only vote once, while letting them vote many times.
We can ignore retracting a vote for now too.

@Thesephi
Copy link
Collaborator Author

Thesephi commented Mar 28, 2022

  • Agreed on the bit where we leave this for a future date for the sake of simple POC.
  • Re. "creating many accounts for testing", NEAR has the sub-account mechanism where it's pretty simple to spin off multiple accounts from an existing account. We can even write a script for this :) We can stay logged in under many accounts on the same machine, so we can sign transactions under those many accounts.

@Thesephi
Copy link
Collaborator Author

Maybe a solution is to keep track of who upvotes and who downvotes instead of the count?

  • Definitely will need a data structure to keep track of account IDs who have voted. Also, the same account cannot put both an upvote and a downvote :)
  • Trivial question: should we still use the vote count as a number? If we keep the list of account IDs, we can retrieve the vote count dynamically & effortlessly, so probably will deprecate the use of vote count as a single number, right?

@khanetor
Copy link
Owner

Maybe a solution is to keep track of who upvotes and who downvotes instead of the count?

* Definitely will need a data structure to keep track of account IDs who have voted. Also, the same account cannot put both an upvote and a downvote :)

* Trivial question: should we still use the vote count as a number? If we keep the list of account IDs, we can retrieve the vote count dynamically & effortlessly, so probably will deprecate the use of vote count as a single number, right?

I would put the voter IDs in the backlog, and simply keep the vote count as numbers (upvotes and downvotes) for the moment.

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

No branches or pull requests

2 participants