diff --git a/consumer/src/firehose/types.rs b/consumer/src/firehose/types.rs index 44228c40..10784cdc 100644 --- a/consumer/src/firehose/types.rs +++ b/consumer/src/firehose/types.rs @@ -91,8 +91,11 @@ pub struct AtpCommitEvent { pub commit: Cid, #[serde(rename = "tooBig")] pub too_big: bool, + #[serde(default)] pub blocks: ByteBuf, + #[serde(default)] pub ops: Vec, + #[serde(default)] pub blobs: Vec, } diff --git a/consumer/src/indexer/mod.rs b/consumer/src/indexer/mod.rs index 78fdd72f..e1a1c147 100644 --- a/consumer/src/indexer/mod.rs +++ b/consumer/src/indexer/mod.rs @@ -371,6 +371,11 @@ async fn index_commit( } } + if commit.ops.is_empty() || commit.blocks.is_empty() { + tracing::debug!("skipping commit with no ops/data"); + return Ok(()); + } + // turn the car slice into a map of cid:block let car_reader = iroh_car::CarReader::new(commit.blocks.as_slice()).await?; let blocks = car_reader