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

@@ -1200,11 +1200,8 @@ impl ProtoArray {
};
// Compute once rather than per-child per-level.
let apply_proposer_boost = self.should_apply_proposer_boost::<E>(
proposer_boost_root,
justified_balances,
spec,
)?;
let apply_proposer_boost =
self.should_apply_proposer_boost::<E>(proposer_boost_root, justified_balances, spec)?;
loop {
let children: Vec<_> = self
@@ -1373,9 +1370,7 @@ impl ProtoArray {
}
child_index = current_index;
current_index = current
.parent()
.ok_or(Error::NodeUnknown(current.root()))?;
current_index = current.parent().ok_or(Error::NodeUnknown(current.root()))?;
}
}