@@ -273,6 +273,8 @@ func (c *channelDefinitionCache) Start(ctx context.Context) error {
273273 }
274274 }
275275
276+ c .lggr .Infow ("started channel definition cache" , "definitions" , c .definitions , "initialBlockNum" , c .initialBlockNum , "persistedBlockNum" , c .persistedBlockNum , "definitionsVersion" , c .definitions .Version )
277+
276278 c .wg .Add (3 )
277279 // We have three concurrent loops
278280 // 1. Poll chain for new logs
@@ -416,13 +418,15 @@ func (c *channelDefinitionCache) readLogs(ctx context.Context) (err error) {
416418 if err != nil {
417419 return err
418420 }
421+ c .lggr .Debugw ("read adder logs" , "fromBlock" , fromBlock , "toBlock" , toBlock , "logsCount" , len (logs ))
419422 c .processLogs (logs )
420423
421424 exprs = buildFilterExprs (c .ownerFilterExprs , fromBlock , toBlock )
422425 logs , err = c .lp .FilteredLogs (ctx , exprs , NoLimitSortAsc , "ChannelDefinitionCachePoller - NewOwnerChannelDefinition" )
423426 if err != nil {
424427 return err
425428 }
429+ c .lggr .Debugw ("read owner logs" , "fromBlock" , fromBlock , "toBlock" , toBlock , "logsCount" , len (logs ))
426430 c .processLogs (logs )
427431
428432 return nil
@@ -582,14 +586,14 @@ func (c *channelDefinitionCache) mergeDefinitions(source uint32, currentDefiniti
582586
583587 case source > SourceOwner :
584588 if def .Tombstone {
585- c .lggr .Warnw ("invalid channel tombstone, cannot be added by source" ,
589+ c .lggr .Debugw ("invalid channel tombstone, cannot be added by source" ,
586590 "channelID" , channelID , "source" , source )
587591 continue
588592 }
589593
590594 if existing , exists := currentDefinitions [channelID ]; exists {
591595 if existing .Source != def .Source {
592- c .lggr .Warnw ("channel adder conflict, skipping definition" ,
596+ c .lggr .Debugw ("channel adder conflict, skipping definition" ,
593597 "channelID" , channelID , "existingSourceID" , existing .Source , "newSourceID" , def .Source )
594598 }
595599 // Adders do not overwrite existing definitions, they can only add new ones
@@ -921,8 +925,10 @@ func (c *channelDefinitionCache) Definitions(prev llotypes.ChannelDefinitions) l
921925 for _ , sourceDefinition := range src {
922926 channelDefinitionCacheCount .
923927 WithLabelValues (strconv .Itoa (int (sourceDefinition .Trigger .Source ))).Set (float64 (len (sourceDefinition .Definitions )))
928+ c .lggr .Debugw ("merging definitions" , "source" , sourceDefinition .Trigger .Source )
924929 c .mergeDefinitions (sourceDefinition .Trigger .Source , merged , sourceDefinition .Definitions , feedIDToChannelID )
925930 }
926931
932+ c .lggr .Debugw ("returning merged definitions" , "definitions" , merged )
927933 return merged
928934}
0 commit comments