def handle_queries(self, queries):
        response = {}
        if self.query_identifiers[0] in queries:
            if not self.handle_blob_data_payment_rate(queries[self.query_identifiers[0]]):
                    response['blob_data_payment_rate'] = "RATE_TOO_LOW"
            else:
                response['blob_data_payment_rate'] = 'RATE_ACCEPTED'

        if self.query_identifiers[1] in queries:
            log.debug("Received the client's request to send a blob")
            response_fields = {}
            response['incoming_blob'] = response_fields

            if self.blob_data_payment_rate is None:
                response_fields['error'] = "RATE_UNSET"
                return defer.succeed(response)
            else:

                d = self.blob_manager.get_blob(queries[self.query_identifiers[1]], True)

                def open_blob_for_reading(blob):
                    if blob.is_validated():
                        read_handle = blob.open_for_reading()
                        if read_handle is not None:
                            self.currently_uploading = blob
                            self.read_handle = read_handle
                            log.debug("Sending %s to client", str(blob))
                            response_fields['blob_hash'] = blob.blob_hash
                            response_fields['length'] = blob.length
                            return response
                    log.debug("We can not send %s", str(blob))
                    response_fields['error'] = "BLOB_UNAVAILABLE"
                    return response

                d.addCallback(open_blob_for_reading)

                return d
        else:
            return defer.succeed(response)

    ######### IBlobSender #########
dataset/ETHPy150Open lbryio/lbry/lbrynet/core/server/BlobRequestHandler.py/BlobRequestHandler.handle_queries/original