remove statement::invalid (#2597)

This commit is contained in:
Robert Habermeier
2021-03-10 10:31:17 -06:00
committed by GitHub
parent 639dcc2e75
commit 9331e06eda
6 changed files with 25 additions and 305 deletions
+1 -5
View File
@@ -52,9 +52,6 @@ pub enum Statement {
/// A statement that a validator has deemed a candidate valid.
#[codec(index = 2)]
Valid(CandidateHash),
/// A statement that a validator has deemed a candidate invalid.
#[codec(index = 3)]
Invalid(CandidateHash),
}
impl Statement {
@@ -64,7 +61,7 @@ impl Statement {
/// for large candidates.
pub fn candidate_hash(&self) -> CandidateHash {
match *self {
Statement::Valid(ref h) | Statement::Invalid(ref h) => *h,
Statement::Valid(ref h) => *h,
Statement::Seconded(ref c) => c.hash(),
}
}
@@ -75,7 +72,6 @@ impl Statement {
match *self {
Statement::Seconded(ref c) => CompactStatement::Seconded(c.hash()),
Statement::Valid(hash) => CompactStatement::Valid(hash),
Statement::Invalid(hash) => CompactStatement::Invalid(hash),
}
}
}