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

Prevent validator from slashing itself #893

Closed Gnappuraz closed 5 years ago

Gnappuraz commented 5 years ago

As a precautionary measure, since even with a perfectly working implementation is possible via rpc to send an invalid vote and cause a slash, I think we should prevent a node from sending a slash transaction about itself.

This PR tries to achieve exactly that, for the moment a WARNING will be printed to help track in the logs unwanted/buggy scenarios where this happens spontaneously.