mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
remove statement::invalid (#2597)
This commit is contained in:
committed by
GitHub
parent
639dcc2e75
commit
9331e06eda
@@ -688,8 +688,6 @@ pub enum CompactStatement {
|
||||
Seconded(CandidateHash),
|
||||
/// State that a parachain candidate is valid.
|
||||
Valid(CandidateHash),
|
||||
/// State that a parachain candidate is invalid.
|
||||
Invalid(CandidateHash),
|
||||
}
|
||||
|
||||
// Inner helper for codec on `CompactStatement`.
|
||||
@@ -699,8 +697,6 @@ enum CompactStatementInner {
|
||||
Seconded(CandidateHash),
|
||||
#[codec(index = 2)]
|
||||
Valid(CandidateHash),
|
||||
#[codec(index = 3)]
|
||||
Invalid(CandidateHash),
|
||||
}
|
||||
|
||||
impl From<CompactStatement> for CompactStatementInner {
|
||||
@@ -708,7 +704,6 @@ impl From<CompactStatement> for CompactStatementInner {
|
||||
match s {
|
||||
CompactStatement::Seconded(h) => CompactStatementInner::Seconded(h),
|
||||
CompactStatement::Valid(h) => CompactStatementInner::Valid(h),
|
||||
CompactStatement::Invalid(h) => CompactStatementInner::Invalid(h),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -735,7 +730,6 @@ impl parity_scale_codec::Decode for CompactStatement {
|
||||
Ok(match CompactStatementInner::decode(input)? {
|
||||
CompactStatementInner::Seconded(h) => CompactStatement::Seconded(h),
|
||||
CompactStatementInner::Valid(h) => CompactStatement::Valid(h),
|
||||
CompactStatementInner::Invalid(h) => CompactStatement::Invalid(h),
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -744,10 +738,7 @@ impl CompactStatement {
|
||||
/// Get the underlying candidate hash this references.
|
||||
pub fn candidate_hash(&self) -> &CandidateHash {
|
||||
match *self {
|
||||
CompactStatement::Seconded(ref h)
|
||||
| CompactStatement::Valid(ref h)
|
||||
| CompactStatement::Invalid(ref h)
|
||||
=> h
|
||||
CompactStatement::Seconded(ref h) | CompactStatement::Valid(ref h) => h,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user