diff --git a/crates/primitives-traits/src/block/mod.rs b/crates/primitives-traits/src/block/mod.rs index 37b16048e..fa6bc2c3a 100644 --- a/crates/primitives-traits/src/block/mod.rs +++ b/crates/primitives-traits/src/block/mod.rs @@ -84,6 +84,11 @@ pub trait Block: SealedBlock::new_unchecked(self, hash) } + /// Creates the [`SealedBlock`] from the block's parts without calculating the hash upfront. + fn seal(self) -> SealedBlock { + SealedBlock::new_unhashed(self) + } + /// Calculate the header hash and seal the block so that it can't be changed. fn seal_slow(self) -> SealedBlock { SealedBlock::seal_slow(self)