add reasons to slash evidence (#414)

* add reasons to slash evidence

* fix CI failing

* Remove unnecessary clones

.encode() takes &self

* InvalidVr to InvalidValidRound

* Unrelated to this PR: Clarify reasoning/potentials behind dropping evidence

* Clarify prevotes in SlashEvidence test

* Replace use of read_to_end

* Restore decode_signed_message

---------

Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
This commit is contained in:
akildemir
2023-11-05 07:04:41 +03:00
committed by GitHub
parent 257323c1e5
commit 97fedf65d0
10 changed files with 238 additions and 152 deletions

View File

@@ -282,7 +282,7 @@ pub trait Network: Sized + Send + Sync {
/// Trigger a slash for the validator in question who was definitively malicious.
///
/// The exact process of triggering a slash is undefined and left to the network as a whole.
async fn slash(&mut self, validator: Self::ValidatorId, slash_event: SlashEvent<Self>);
async fn slash(&mut self, validator: Self::ValidatorId, slash_event: SlashEvent);
/// Validate a block.
async fn validate(&mut self, block: &Self::Block) -> Result<(), BlockError>;