Re-do head_payload_status

This commit is contained in:
Michael Sproul
2026-03-25 14:05:11 +11:00
parent c841603003
commit 8b448864f0
18 changed files with 143 additions and 119 deletions

View File

@@ -3935,7 +3935,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
let fork_choice_timer = metrics::start_timer(&metrics::BLOCK_PROCESSING_FORK_CHOICE);
match fork_choice.get_head(current_slot, &self.spec) {
// This block became the head, add it to the early attester cache.
Ok(new_head_root) if new_head_root == block_root => {
Ok((new_head_root, _)) if new_head_root == block_root => {
if let Some(proto_block) = fork_choice.get_block(&block_root) {
let new_head_is_optimistic =
proto_block.execution_status.is_optimistic_or_invalid();
@@ -4906,6 +4906,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
.and_then(|execution_status| execution_status.block_hash());
let forkchoice_update_params = ForkchoiceUpdateParameters {
head_root: info.parent_node.root(),
head_payload_status: canonical_forkchoice_params.head_payload_status,
head_hash: parent_head_hash,
justified_hash: canonical_forkchoice_params.justified_hash,
finalized_hash: canonical_forkchoice_params.finalized_hash,