Check signatures as "Compact" in statement distribution (#5071)

* allow converting payloads _up_

* convert to superpayload in statement-distribution

* Update primitives/src/v2/signed.rs

Co-authored-by: Andronik <write@reusable.software>

Co-authored-by: Andronik <write@reusable.software>
This commit is contained in:
Robert Habermeier
2022-03-10 14:49:35 -06:00
committed by GitHub
parent 22a7fad75f
commit 8a17c614f0
5 changed files with 109 additions and 27 deletions
@@ -357,6 +357,14 @@ pub mod v1 {
}
}
/// Get the signature from the statement.
pub fn get_signature(&self) -> ValidatorSignature {
match self {
Self::Statement(_, statement) => statement.unchecked_signature().clone(),
Self::LargeStatement(metadata) => metadata.signature.clone(),
}
}
/// Get contained relay parent.
pub fn get_relay_parent(&self) -> Hash {
match self {