Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Set the artifact state depending on the result
  • Loading branch information
slumber committed Sep 27, 2021
commit 7c0b8ed76b00c4412ab3ced6cf4fd9b878c505e5
7 changes: 4 additions & 3 deletions node/core/pvf/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ async fn handle_prepare_done(

// Don't send failed artifacts to the execution's queue.
if let Err(ref error) = result {
*state = ArtifactState::FailedToProcess(error.clone());
let _ = result_tx.send(Err(ValidationError::from(error.clone())));
continue
}
Expand All @@ -535,8 +534,10 @@ async fn handle_prepare_done(
.await?;
}

// Now consider the artifact prepared.
*state = ArtifactState::Prepared { last_time_needed: SystemTime::now() };
*state = match result {
Ok(()) => ArtifactState::Prepared { last_time_needed: SystemTime::now() },
Err(error) => ArtifactState::FailedToProcess(error.clone()),
};

Ok(())
}
Expand Down