dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Don't record votes with invalid signature #789

Closed kostyantyn closed 5 years ago

kostyantyn commented 5 years ago

Resolves #680

The issue was that we recorded all votes, even if their signature was invalid. Then when a valid vote arrives, we count it as a double-vote and create slash transaction.

Also, in this PR I've rewritten the esperanza_slash.py as the previous one was broken. Currently, we test only double-votes. In the follow-up PR, I'll add tests for surrounded votes.

Signed-off-by: Kostiantyn Stepaniuk kostia@thirdhash.com

AM5800 commented 5 years ago

utACK e1df976