async def _payment_address_init(self): pmt_addrs = await self.__create_payment_addresses( self._payment_addrs_count) for payment_addrs_chunk in divide_sequence_into_chunks(pmt_addrs, 500): await self.__mint_sources(payment_addrs_chunk, self._addr_mint_limit) for pa in pmt_addrs: self._addr_txos.update(await self._get_payment_sources(pa))
async def _payment_address_init(self): pmt_addrs = await self.__create_payment_addresses(self._payment_addrs_count) mint_addrs = pmt_addrs[:self._mint_addrs_count] for payment_addrs_chunk in divide_sequence_into_chunks(mint_addrs, 500): await self.__mint_sources(payment_addrs_chunk, self._addr_mint_limit, self._mint_by) for pa in pmt_addrs: self._addr_txos.update(await self._get_payment_sources(pa)) log_addr_txos_update('MINT', self._addr_txos) self._logger.info("_payment_address_init done")
async def on_pool_create(self, pool_handle, wallet_handle, submitter_did, *args, **kwargs): await super().on_pool_create(pool_handle, wallet_handle, submitter_did, *args, **kwargs) self._pool_handle = pool_handle self._wallet_handle = wallet_handle self._submitter_did = submitter_did await self.__ensure_submitter_is_trustee() self._additional_trustees_dids = await self.__create_additional_trustees() await self.__create_payment_addresses() for payment_addrs_chunk in divide_sequence_into_chunks(self._payment_addresses, RGBasePayment.MINT_RECIPIENTS_LIMIT): await self.__mint_sources(payment_addrs_chunk, [self._submitter_did, *self._additional_trustees_dids])