Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cache: Invalid votes being incorrectly added #881
Invalid votes, such as duplicate votes, are currently being added to the cache even though they were rejected by politeiad. This is causing an incorrect vote tally to be returned from politeiawww. An example of this is the EXMO proposal. There are only 9000 votes in the votes journal for the proposal, but the proposals site is currently displaying a vote total of 9123 votes.
Most decred plugin commands return an error from politeiad when an error occurs. The ballot decred plugin command is unique in that it still returns a valid response and includes the error in the vote receipt. The cache wasn't checking the vote receipt for errors and was incorrectly treating these votes as valid.
This is a minor issue that can be fixed by adding some extra validation to the cache and rebuilding it. The integrity of the politeiad git repos is not affected.