von_anchor/anchor/issuer.py
async def _sync_revoc_for_issue(self, rr_id: str, rr_size: int = None) -> None:
        """
        Create revocation registry if need be for input revocation registry identifier;
        open and cache tails file reader.

        :param rr_id: revocation registry identifier
        :param rr_size: if new revocation registry necessary, its size (default as per RevRegBuilder._create_rev_reg())
        """

        LOGGER.debug('Issuer._sync_revoc_for_issue >>> rr_id: %s, rr_size: %s', rr_id, rr_size)

        if not ok_rev_reg_id(rr_id):
            LOGGER.debug('Issuer._sync_revoc_for_issue <!< Bad rev reg id %s', rr_id)
            raise BadIdentifier('Bad rev reg id {}'.format(rr_id))

        (cd_id, tag) = rev_reg_id2cred_def_id_tag(rr_id)

        try:
            await self.get_cred_def(cd_id)
        except AbsentCredDef:
            LOGGER.debug(
                'Issuer._sync_revoc_for_issue <!< tails tree %s may be for another ledger; no cred def found on %s',
                self._dir_tails,
                cd_id)
            raise AbsentCredDef('Tails tree {} may be for another ledger; no cred def found on {}'.format(
                self._dir_tails,
                cd_id))

        with REVO_CACHE.lock:
            revo_cache_entry = REVO_CACHE.get(rr_id, None)
            tails = None if revo_cache_entry is None else revo_cache_entry.tails
            if tails is None:  #  it's a new revocation registry, or not yet set in cache
                try:
                    tails = await Tails(self._dir_tails, cd_id, tag).open()
                except AbsentTails:   # it's a new revocation registry
                    if self._rrbx:
                        await self._set_rev_reg(rr_id, rr_size)
                    else:
                        await self._create_rev_reg(rr_id, rr_size)
                        await self._send_rev_reg_def(rr_id)
                    tails = await Tails(self._dir_tails, cd_id, tag).open()  # symlink should exist now

                if revo_cache_entry is None:
                    REVO_CACHE[rr_id] = RevoCacheEntry(None, tails)
                else:
                    REVO_CACHE[rr_id].tails = tails

        LOGGER.debug('Issuer._sync_revoc_for_issue <<<')

        Create revocation registry if need be for input revocation registry identifier;
        open and cache tails file reader.

        :param rr_id: revocation registry identifier
        :param rr_size: if new revocation registry necessary, its size (default as per RevRegBuilder._create_rev_reg())
        
Create revocation registry if need be for input revocation registry identifier;
open and cache tails file reader.
Create revocation registry if need be for input revocation registry identifier ; open and cache tails file reader .
async def _sync_revoc_for_issue(self, rr_id: str, rr_size: int = None) -> None:
        LOGGER.debug('Issuer._sync_revoc_for_issue >>> rr_id: %s, rr_size: %s', rr_id, rr_size)
        if not ok_rev_reg_id(rr_id):
            LOGGER.debug('Issuer._sync_revoc_for_issue <!< Bad rev reg id %s', rr_id)
            raise BadIdentifier('Bad rev reg id {}'.format(rr_id))
        (cd_id, tag) = rev_reg_id2cred_def_id_tag(rr_id)
        try:
            await self.get_cred_def(cd_id)
        except AbsentCredDef:
            LOGGER.debug(
                'Issuer._sync_revoc_for_issue <!< tails tree %s may be for another ledger; no cred def found on %s',
                self._dir_tails,
                cd_id)
            raise AbsentCredDef('Tails tree {} may be for another ledger; no cred def found on {}'.format(
                self._dir_tails,
                cd_id))
        with REVO_CACHE.lock:
            revo_cache_entry = REVO_CACHE.get(rr_id, None)
            tails = None if revo_cache_entry is None else revo_cache_entry.tails
            if tails is None:  
                try:
                    tails = await Tails(self._dir_tails, cd_id, tag).open()
                except AbsentTails:   
                    if self._rrbx:
                        await self._set_rev_reg(rr_id, rr_size)
                    else:
                        await self._create_rev_reg(rr_id, rr_size)
                        await self._send_rev_reg_def(rr_id)
                    tails = await Tails(self._dir_tails, cd_id, tag).open()  
                if revo_cache_entry is None:
                    REVO_CACHE[rr_id] = RevoCacheEntry(None, tails)
                else:
                    REVO_CACHE[rr_id].tails = tails
        LOGGER.debug('Issuer._sync_revoc_for_issue <<<')
async def _sync_revoc_for_issue ( self , rr_id : str , rr_size : int = None ) -> None : LOGGER . debug ( 'Issuer._sync_revoc_for_issue >>> rr_id: %s, rr_size: %s' , rr_id , rr_size ) if not ok_rev_reg_id ( rr_id ) : LOGGER . debug ( 'Issuer._sync_revoc_for_issue <!< Bad rev reg id %s' , rr_id ) raise BadIdentifier ( 'Bad rev reg id {}' . format ( rr_id ) ) ( cd_id , tag ) = rev_reg_id2cred_def_id_tag ( rr_id ) try : await self . get_cred_def ( cd_id ) except AbsentCredDef : LOGGER . debug ( 'Issuer._sync_revoc_for_issue <!< tails tree %s may be for another ledger; no cred def found on %s' , self . _dir_tails , cd_id ) raise AbsentCredDef ( 'Tails tree {} may be for another ledger; no cred def found on {}' . format ( self . _dir_tails , cd_id ) ) with REVO_CACHE . lock : revo_cache_entry = REVO_CACHE . get ( rr_id , None ) tails = None if revo_cache_entry is None else revo_cache_entry . tails if tails is None : try : tails = await Tails ( self . _dir_tails , cd_id , tag ) . open ( ) except AbsentTails : if self . _rrbx : await self . _set_rev_reg ( rr_id , rr_size ) else : await self . _create_rev_reg ( rr_id , rr_size ) await self . _send_rev_reg_def ( rr_id ) tails = await Tails ( self . _dir_tails , cd_id , tag ) . open ( ) if revo_cache_entry is None : REVO_CACHE [ rr_id ] = RevoCacheEntry ( None , tails ) else : REVO_CACHE [ rr_id ] . tails = tails LOGGER . debug ( 'Issuer._sync_revoc_for_issue <<<' )
Create revocation registry if need be for input revocation registry identifier;
open and cache tails file reader.
Create revocation registry if need be for input revocation registry identifier ; open and cache tails file reader .
"""
        Create revocation registry if need be for input revocation registry identifier;
        open and cache tails file reader.

        :param rr_id: revocation registry identifier
        :param rr_size: if new revocation registry necessary, its size (default as per RevRegBuilder._create_rev_reg())
        """ #  it's a new revocation registry, or not yet set in cache # it's a new revocation registry # symlink should exist now
self
rr_id
str
revocation registry identifier
revocation registry identifier
rr_size
int
if new revocation registry necessary, its size (default as per RevRegBuilder._create_rev_reg())
if new revocation registry necessary its size ( default as per RevRegBuilder . _create_rev_reg () )