File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ use graph::prelude::*;
33pub fn validate_manifest (
44 manifest : SubgraphManifest ,
55) -> Result < SubgraphManifest , SubgraphRegistrarError > {
6- let mut validation_errs: Vec < SubgraphManifestValidationError > = Vec :: new ( ) ;
7-
6+ let mut validation_errs: Vec < SubgraphManifestValidationError > = Vec :: new ( ) ;
7+
88 // Validate that the manifest has a `source` address in each data source
99 // which has call or block handlers
1010 let has_invalid_data_source = manifest. data_sources . iter ( ) . any ( |data_source| {
@@ -32,8 +32,9 @@ pub fn validate_manifest(
3232 . for_each ( |block_handler| {
3333 if block_handler. filter . is_none ( ) {
3434 non_filtered_block_handler_count += 1
35+ } else {
36+ call_filtered_block_handler_count += 1
3537 }
36- call_filtered_block_handler_count += 1
3738 } ) ;
3839 return non_filtered_block_handler_count > 1 || call_filtered_block_handler_count > 1 ;
3940 } ) ;
@@ -42,7 +43,9 @@ pub fn validate_manifest(
4243 }
4344
4445 if validation_errs. is_empty ( ) {
45- return Ok ( manifest)
46+ return Ok ( manifest) ;
4647 }
47- return Err ( SubgraphRegistrarError :: ManifestValidationError ( validation_errs) )
48+ return Err ( SubgraphRegistrarError :: ManifestValidationError (
49+ validation_errs,
50+ ) ) ;
4851}
You can’t perform that action at this time.
0 commit comments