comment-popularity icon indicating copy to clipboard operation
comment-popularity copied to clipboard

Not allowing negative comment weights results in double-spending problem

Open slavicd opened this issue 7 years ago • 2 comments

If we don't allow negative comment weights (at least internally - not necessarily for user interface), we run into the following possible situation:

  • comment A has weight zero.
  • user downvotes A. A still has weight zero, but a downvote is registered per user*comment
  • user undoes downvote. A has weight 1.
  • user upvotes A. A has weight 2.

slavicd avatar Sep 11 '17 16:09 slavicd

thanks, I was just looking into this actually - do you want to test this PR? https://github.com/humanmade/comment-popularity/pull/115

pdewouters avatar Sep 12 '17 11:09 pdewouters

#114 I actually already submitted a PR - except perhaps it's a little bit of a different approach. Yours makes sense too

slavicd avatar Sep 12 '17 12:09 slavicd