diff --git a/graph-gateway/src/client_query.rs b/graph-gateway/src/client_query.rs index cdc098d9..34e2de46 100644 --- a/graph-gateway/src/client_query.rs +++ b/graph-gateway/src/client_query.rs @@ -625,7 +625,7 @@ fn build_candidates_list( // Infer the indexed range from the indexing progress information let range = { let (start, end) = indexing.progress.as_range(); - start.unwrap_or(0)..=max(end, perf.latest_block + blocks_per_minute) + start.unwrap_or(0)..=(max(end, perf.latest_block) + blocks_per_minute) }; let number_gte = block_requirements.number_gte.unwrap_or(0); @@ -644,7 +644,7 @@ fn build_candidates_list( indexing_id.indexer, IndexerError::Unavailable(UnavailableReason::MissingBlock(MissingBlockError { missing: Some(missing), - latest: None, + latest: Some(max(indexing.progress.latest_block, perf.latest_block)), })), ); continue;