diff --git a/beacon_node/beacon_chain/src/canonical_head.rs b/beacon_node/beacon_chain/src/canonical_head.rs index 30d4a59709..b39b51a9b5 100644 --- a/beacon_node/beacon_chain/src/canonical_head.rs +++ b/beacon_node/beacon_chain/src/canonical_head.rs @@ -608,6 +608,7 @@ impl BeaconChain { // was last run. let old_view = ForkChoiceView { head_block_root: old_cached_head.head_block_root(), + head_payload_status: old_cached_head.head_payload_status(), justified_checkpoint: old_cached_head.justified_checkpoint(), finalized_checkpoint: old_cached_head.finalized_checkpoint(), }; diff --git a/consensus/fork_choice/src/fork_choice.rs b/consensus/fork_choice/src/fork_choice.rs index c6def1562b..896bb87c2d 100644 --- a/consensus/fork_choice/src/fork_choice.rs +++ b/consensus/fork_choice/src/fork_choice.rs @@ -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(), } diff --git a/consensus/proto_array/src/proto_array.rs b/consensus/proto_array/src/proto_array.rs index dae8c608f3..e4e02d5872 100644 --- a/consensus/proto_array/src/proto_array.rs +++ b/consensus/proto_array/src/proto_array.rs @@ -1200,11 +1200,8 @@ impl ProtoArray { }; // Compute once rather than per-child per-level. - let apply_proposer_boost = self.should_apply_proposer_boost::( - proposer_boost_root, - justified_balances, - spec, - )?; + let apply_proposer_boost = + self.should_apply_proposer_boost::(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()))?; } }