mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 12:11:02 +00:00
Preserve artifact cache unless stale (#1918)
Co-authored-by: Marcin S <marcin@realemail.net>
This commit is contained in:
@@ -377,7 +377,7 @@ impl ValidationBackend for MockValidateCandidateBackend {
|
||||
result
|
||||
}
|
||||
|
||||
async fn precheck_pvf(&mut self, _pvf: PvfPrepData) -> Result<PrepareStats, PrepareError> {
|
||||
async fn precheck_pvf(&mut self, _pvf: PvfPrepData) -> Result<(), PrepareError> {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
@@ -1014,11 +1014,11 @@ fn pov_decompression_failure_is_invalid() {
|
||||
}
|
||||
|
||||
struct MockPreCheckBackend {
|
||||
result: Result<PrepareStats, PrepareError>,
|
||||
result: Result<(), PrepareError>,
|
||||
}
|
||||
|
||||
impl MockPreCheckBackend {
|
||||
fn with_hardcoded_result(result: Result<PrepareStats, PrepareError>) -> Self {
|
||||
fn with_hardcoded_result(result: Result<(), PrepareError>) -> Self {
|
||||
Self { result }
|
||||
}
|
||||
}
|
||||
@@ -1034,7 +1034,7 @@ impl ValidationBackend for MockPreCheckBackend {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
async fn precheck_pvf(&mut self, _pvf: PvfPrepData) -> Result<PrepareStats, PrepareError> {
|
||||
async fn precheck_pvf(&mut self, _pvf: PvfPrepData) -> Result<(), PrepareError> {
|
||||
self.result.clone()
|
||||
}
|
||||
}
|
||||
@@ -1051,7 +1051,7 @@ fn precheck_works() {
|
||||
|
||||
let (check_fut, check_result) = precheck_pvf(
|
||||
ctx.sender(),
|
||||
MockPreCheckBackend::with_hardcoded_result(Ok(PrepareStats::default())),
|
||||
MockPreCheckBackend::with_hardcoded_result(Ok(())),
|
||||
relay_parent,
|
||||
validation_code_hash,
|
||||
)
|
||||
@@ -1113,7 +1113,7 @@ fn precheck_invalid_pvf_blob_compression() {
|
||||
|
||||
let (check_fut, check_result) = precheck_pvf(
|
||||
ctx.sender(),
|
||||
MockPreCheckBackend::with_hardcoded_result(Ok(PrepareStats::default())),
|
||||
MockPreCheckBackend::with_hardcoded_result(Ok(())),
|
||||
relay_parent,
|
||||
validation_code_hash,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user