code: func (f *Filter) checkMatches(ctx context.Context, header *types.Header) (logs []*types.Log, err error) {
  	// Get the logs of the block
  	logsList, err := f.backend.GetLogs(ctx, header.Hash())
  	if err != nil {
  		return nil, err
  	}
  	var unfiltered []*types.Log
  	for _, logs := range logsList {
  		unfiltered = append(unfiltered, logs...)
  	}
  	logs = filterLogs(unfiltered, nil, nil, f.addresses, f.topics)
  	if len(logs) > 0 {
  		// We have matching logs, check if we need to resolve full logs via the light client
  		if logs[0].TxHash == (common.Hash{}) {
  			receipts, err := f.backend.GetReceipts(ctx, header.Hash())
  			if err != nil {
  				return nil, err
  			}
  			unfiltered = unfiltered[:0]
  			for _, receipt := range receipts {
  				unfiltered = append(unfiltered, receipt.Logs...)
  			}
  			logs = filterLogs(unfiltered, nil, nil, f.addresses, f.topics)
  		}
  		return logs, nil
  	}
  	return nil, nil
  }
docs: // checkMatches checks if the receipts belonging to the given header contain any log events that
  // match the filter criteria. This function is called when the bloom filter signals a potential match.