Resolve merge conflicts

This commit is contained in:
Eitan Seri-Levi
2026-05-17 12:13:00 +03:00
161 changed files with 1979 additions and 1320 deletions

View File

@@ -69,6 +69,13 @@ impl<E: EthSpec> Block<E> {
}
}
pub fn timestamp(&self) -> u64 {
match self {
Block::PoW(block) => block.timestamp,
Block::PoS(payload) => payload.timestamp(),
}
}
pub fn total_difficulty(&self) -> Option<Uint256> {
match self {
Block::PoW(block) => Some(block.total_difficulty),
@@ -563,6 +570,23 @@ impl<E: EthSpec> ExecutionBlockGenerator<E> {
self.insert_block(Block::PoS(payload))?;
}
// Post-Gloas, the justified and finalized block hashes must be non-zero, since the
// CL always has a known parent_block_hash to reference.
if let Some(head_block) = self.blocks.get(&head_block_hash)
&& self
.get_fork_at_timestamp(head_block.timestamp())
.gloas_enabled()
{
assert!(
forkchoice_state.safe_block_hash != ExecutionBlockHash::zero(),
"post-Gloas safe_block_hash must not be zero"
);
assert!(
forkchoice_state.finalized_block_hash != ExecutionBlockHash::zero(),
"post-Gloas finalized_block_hash must not be zero"
);
}
let unknown_head_block_hash = !self.blocks.contains_key(&head_block_hash);
let unknown_safe_block_hash = forkchoice_state.safe_block_hash
!= ExecutionBlockHash::zero()