fix: sync to head block instead (#2854)

This commit is contained in:
Matthias Seitz
2023-05-26 17:56:07 +02:00
committed by GitHub
parent 689d869b8b
commit f5b091dd53

View File

@@ -822,7 +822,6 @@ where
// closing the gap either via pipeline, or by fetching the blocks via block number
// [head..FCU.number]
let hash = block.hash;
if self
.try_insert_new_payload(block)
.map(|status| status.is_valid())
@@ -830,9 +829,9 @@ where
{
// payload is valid
self.sync_state_updater.update_sync_state(SyncState::Idle);
} else {
// if the payload is invalid, we run the pipeline
self.sync.set_pipeline_sync_target(hash);
} else if let Some(ref state) = self.forkchoice_state {
// if the payload is invalid, we run the pipeline to the head block.
self.sync.set_pipeline_sync_target(state.head_block_hash);
}
}
EngineSyncEvent::PipelineStarted(target) => {