fix: wrong is valid if branch (#2831)

This commit is contained in:
Matthias Seitz
2023-05-25 14:23:14 +02:00
committed by GitHub
parent 455eead32f
commit ac8d6f062d
2 changed files with 8 additions and 2 deletions

View File

@@ -828,10 +828,11 @@ where
.map(|status| status.is_valid())
.unwrap_or_default()
{
// 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 {
self.sync_state_updater.update_sync_state(SyncState::Idle);
}
}
EngineSyncEvent::PipelineStarted(target) => {

View File

@@ -102,6 +102,11 @@ where
/// Starts requesting a full block from the network.
pub(crate) fn download_full_block(&mut self, hash: H256) {
trace!(
target: "consensus::engine",
?hash,
"start downloading full block."
);
let request = self.full_block_client.get_full_block(hash);
self.inflight_full_block_requests.push(request);
}