Include head_payload_status in ForkChoiceView comparison

The early exit check in recompute_head_at_slot compared only
head_block_root and checkpoints. When on_execution_payload changed
the payload status from Empty to Full without changing the head root,
the CachedHead was not updated. Add head_payload_status to
ForkChoiceView so the change is detected.
This commit is contained in:
dapplion
2026-03-25 16:40:17 -05:00
parent e943888ee7
commit 93ef1e395c
3 changed files with 6 additions and 8 deletions

View File

@@ -342,6 +342,7 @@ pub struct ForkchoiceUpdateParameters {
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct ForkChoiceView {
pub head_block_root: Hash256,
pub head_payload_status: PayloadStatus,
pub justified_checkpoint: Checkpoint,
pub finalized_checkpoint: Checkpoint,
}
@@ -674,6 +675,7 @@ where
pub fn cached_fork_choice_view(&self) -> ForkChoiceView {
ForkChoiceView {
head_block_root: self.forkchoice_update_parameters.head_root,
head_payload_status: self.forkchoice_update_parameters.head_payload_status,
justified_checkpoint: self.justified_checkpoint(),
finalized_checkpoint: self.finalized_checkpoint(),
}