From 931fad7c46c1c28731c8a325889fa9921f9a5bf4 Mon Sep 17 00:00:00 2001 From: Povilas Liubauskas Date: Thu, 31 Oct 2024 12:21:03 +0200 Subject: [PATCH] Fix notify_forkchoice_updated not being called on head change issue --- fork_choice_control/src/mutator.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/fork_choice_control/src/mutator.rs b/fork_choice_control/src/mutator.rs index a8178a9..f272f8b 100644 --- a/fork_choice_control/src/mutator.rs +++ b/fork_choice_control/src/mutator.rs @@ -1723,17 +1723,15 @@ where let safe_block_hash = self.store.safe_execution_payload_hash(); let finalized_block_hash = self.store.finalized_execution_payload_hash(); - if !new_head.is_valid() { - let head_block_hash = state.latest_execution_payload_header().block_hash(); - - self.execution_engine.notify_forkchoice_updated( - head_block_hash, - safe_block_hash, - finalized_block_hash, - Either::Left(new_head.block.phase()), - None, - ); - } + let head_block_hash = state.latest_execution_payload_header().block_hash(); + + self.execution_engine.notify_forkchoice_updated( + head_block_hash, + safe_block_hash, + finalized_block_hash, + Either::Left(new_head.block.phase()), + None, + ); } fn delay_block_until_blobs(&mut self, beacon_block_root: H256, pending_block: PendingBlock

) {