@@ -1371,11 +1371,14 @@ def _resolve_index_subscriptions(self, index_config: IndexConfigT) -> None:
13711371 if isinstance (index_config , OperationIndexConfig ):
13721372 if self .advanced .merge_subscriptions :
13731373 index_config .subscriptions .add (TransactionSubscription ())
1374- else :
1375- for contract_config in index_config .contracts :
1376- if not isinstance (contract_config , ContractConfig ):
1377- raise ConfigInitializationException
1378- index_config .subscriptions .add (TransactionSubscription (address = contract_config .address ))
1374+ return
1375+
1376+ if not index_config .contracts :
1377+ raise ConfigurationError ('`OperationIndexConfig.contracts` must be set when `merge_subscriptions` flag is disabled' )
1378+ for contract_config in index_config .contracts :
1379+ if not isinstance (contract_config , ContractConfig ):
1380+ raise ConfigInitializationException
1381+ index_config .subscriptions .add (TransactionSubscription (address = contract_config .address ))
13791382
13801383 for handler_config in index_config .handlers :
13811384 for pattern_config in handler_config .pattern :
@@ -1386,10 +1389,11 @@ def _resolve_index_subscriptions(self, index_config: IndexConfigT) -> None:
13861389 elif isinstance (index_config , BigMapIndexConfig ):
13871390 if self .advanced .merge_subscriptions :
13881391 index_config .subscriptions .add (BigMapSubscription ())
1389- else :
1390- for big_map_handler_config in index_config .handlers :
1391- address , path = big_map_handler_config .contract_config .address , big_map_handler_config .path
1392- index_config .subscriptions .add (BigMapSubscription (address = address , path = path ))
1392+ return
1393+
1394+ for big_map_handler_config in index_config .handlers :
1395+ address , path = big_map_handler_config .contract_config .address , big_map_handler_config .path
1396+ index_config .subscriptions .add (BigMapSubscription (address = address , path = path ))
13931397
13941398 # NOTE: HeadSubscription is always enabled
13951399 elif isinstance (index_config , HeadIndexConfig ):
0 commit comments