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

@ -1087,7 +1087,7 @@ where
// 2. ensure we can apply a new chain update for the head block
if let Some(chain_update) = self.on_new_head(state.head_block_hash)? {
let tip = chain_update.tip().sealed_header().clone();
let tip = chain_update.tip().clone_sealed_header();
self.on_canonical_chain_update(chain_update);
// update the safe and finalized blocks and ensure their values are valid
@ -1626,7 +1626,7 @@ where
.state
.tree_state
.block_by_hash(hash)
.map(|block| block.as_ref().sealed_header().clone());
.map(|block| block.as_ref().clone_sealed_header());
if block.is_some() {
Ok(block)
@ -2039,7 +2039,7 @@ where
// update the tracked canonical head
self.state.tree_state.set_canonical_head(chain_update.tip().num_hash());
let tip = chain_update.tip().sealed_header().clone();
let tip = chain_update.tip().clone_sealed_header();
let notification = chain_update.to_chain_notification();
// reinsert any missing reorged blocks