code: func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([]*types.Log, error) {
  	var filter *Filter
  	if crit.BlockHash != nil {
  		// Block filter requested, construct a single-shot filter
  		filter = NewBlockFilter(api.backend, *crit.BlockHash, crit.Addresses, crit.Topics)
  	} else {
  		// Convert the RPC block numbers into internal representations
  		begin := rpc.LatestBlockNumber.Int64()
  		if crit.FromBlock != nil {
  			begin = crit.FromBlock.Int64()
  		}
  		end := rpc.LatestBlockNumber.Int64()
  		if crit.ToBlock != nil {
  			end = crit.ToBlock.Int64()
  		}
  		// Construct the range filter
  		filter = NewRangeFilter(api.backend, begin, end, crit.Addresses, crit.Topics)
  	}
  	// Run the filter and return all the logs
  	logs, err := filter.Logs(ctx)
  	if err != nil {
  		return nil, err
  	}
  	return returnLogs(logs), err
  }
docs: // GetLogs returns logs matching the given argument that are stored within the state.
  //
  // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs