mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: add SealedHeader::seal (#12497)
This commit is contained in:
@ -56,6 +56,14 @@ impl<H> SealedHeader<H> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<H: Sealable> SealedHeader<H> {
|
||||
/// Hashes the header and creates a sealed header.
|
||||
pub fn seal(header: H) -> Self {
|
||||
let hash = header.hash_slow();
|
||||
Self::new(header, hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl<H: alloy_consensus::BlockHeader> SealedHeader<H> {
|
||||
/// Return the number hash tuple.
|
||||
pub fn num_hash(&self) -> BlockNumHash {
|
||||
|
||||
Reference in New Issue
Block a user