feat(engine): new payload execution (#631)

* feat(engine): new payload execution

* address PR comments

* rm unused dev deps

* add comment about lru

* remove par_iter
This commit is contained in:
Roman Krasiuk
2022-12-29 12:36:56 +02:00
committed by GitHub
parent 47d044942b
commit 565a0aa90b
22 changed files with 377 additions and 190 deletions

View File

@@ -37,12 +37,26 @@ impl SealedBlock {
pub fn hash(&self) -> H256 {
self.header.hash()
}
/// Splits the sealed block into underlying components
pub fn split(self) -> (SealedHeader, Vec<TransactionSigned>, Vec<SealedHeader>) {
(self.header, self.body, self.ommers)
}
/// Unseal the block
pub fn unseal(self) -> Block {
Block {
header: self.header.unseal(),
body: self.body,
ommers: self.ommers.into_iter().map(|o| o.unseal()).collect(),
}
}
}
impl Deref for SealedBlock {
type Target = Header;
type Target = SealedHeader;
fn deref(&self) -> &Self::Target {
self.header.as_ref()
&self.header
}
}