feat: add SealedBlock::clone_sealed_header (#13739)

This commit is contained in:
Matthias Seitz
2025-01-08 18:33:56 +01:00
committed by GitHub
parent d336ceb27e
commit 28d52312ac
10 changed files with 44 additions and 36 deletions

View File

@ -195,6 +195,14 @@ impl<H, B> SealedBlock<H, B> {
&self.header
}
/// Clones the wrapped header and returns a [`SealedHeader`] sealed with the hash.
pub fn clone_sealed_header(&self) -> SealedHeader<H>
where
H: Clone,
{
self.header.clone()
}
/// Consumes the block and returns the sealed header.
pub fn into_sealed_header(self) -> SealedHeader<H> {
self.header