diff --git a/src/networks/actors_bundle.rs b/src/networks/actors_bundle.rs index a66d1b33428..0f5695c7fac 100644 --- a/src/networks/actors_bundle.rs +++ b/src/networks/actors_bundle.rs @@ -201,11 +201,7 @@ pub async fn generate_actor_bundle(output: &Path) -> anyhow::Result<()> { blocks.dedup(); for block in blocks.iter() { - ensure!( - block.valid(), - "sources contain an invalid block, cid {}", - block.cid - ) + block.validate()?; } stream::iter(blocks) diff --git a/src/utils/db/car_stream.rs b/src/utils/db/car_stream.rs index 7ac0721ebb9..55b9b86dbd1 100644 --- a/src/utils/db/car_stream.rs +++ b/src/utils/db/car_stream.rs @@ -245,7 +245,7 @@ mod tests { let blocks: Vec = stream.try_collect().await.unwrap(); assert_eq!(blocks.len(), 1207); for block in blocks { - assert!(block.valid()); + block.validate().unwrap(); } } @@ -255,7 +255,7 @@ mod tests { let blocks: Vec = stream.try_collect().await.unwrap(); assert_eq!(blocks.len(), 1222); for block in blocks { - assert!(block.valid()); + block.validate().unwrap(); } } }