diff --git a/crates/primitives-traits/src/header/sealed.rs b/crates/primitives-traits/src/header/sealed.rs index b0fe44342988..145e2722bfa3 100644 --- a/crates/primitives-traits/src/header/sealed.rs +++ b/crates/primitives-traits/src/header/sealed.rs @@ -56,6 +56,14 @@ impl SealedHeader { } } +impl SealedHeader { + /// Hashes the header and creates a sealed header. + pub fn seal(header: H) -> Self { + let hash = header.hash_slow(); + Self::new(header, hash) + } +} + impl SealedHeader { /// Return the number hash tuple. pub fn num_hash(&self) -> BlockNumHash {