mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add Block::seal (#14451)
This commit is contained in:
@ -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<Self> {
|
||||
SealedBlock::new_unhashed(self)
|
||||
}
|
||||
|
||||
/// Calculate the header hash and seal the block so that it can't be changed.
|
||||
fn seal_slow(self) -> SealedBlock<Self> {
|
||||
SealedBlock::seal_slow(self)
|
||||
|
||||
Reference in New Issue
Block a user