chore: simplify OpBuiltPayload (#14152)

This commit is contained in:
Arsenii Kulikov
2025-02-02 20:32:16 +04:00
committed by GitHub
parent 60337077c8
commit 0c3ccccba9
3 changed files with 34 additions and 60 deletions

View File

@ -847,6 +847,12 @@ impl<N: NodePrimitives> ExecutedBlockWithTrieUpdates<N> {
pub fn trie_updates(&self) -> &TrieUpdates {
&self.trie
}
/// Converts the value into [`SealedBlock`].
pub fn into_sealed_block(self) -> SealedBlock<N::Block> {
let block = Arc::unwrap_or_clone(self.block.recovered_block);
block.into_sealed_block()
}
}
/// Non-empty chain of blocks.