diff --git a/src/sakia/data/processors/dividends.py b/src/sakia/data/processors/dividends.py index 3da268237c8a2cf55550b7be6e576aa3ceee67e6..7d30ca3f3cd4533908eebfb6c49fdf0b039392e7 100644 --- a/src/sakia/data/processors/dividends.py +++ b/src/sakia/data/processors/dividends.py @@ -69,8 +69,6 @@ class DividendsProcessor: if input.source == "D" and input.origin_id == connection.pubkey and input.index not in block_numbers: block = await self._bma_connector.get(connection.currency, bma.blockchain.block, req_args={'number': input.index}) - await asyncio.sleep(0.5) - dividend = Dividend(currency=connection.currency, pubkey=connection.pubkey, block_number=input.index, diff --git a/src/sakia/data/processors/sources.py b/src/sakia/data/processors/sources.py index c93986d99923fa88cd6246751b397ac77ecbe5de..eab045c04260af07722be4f0335655c4b84e56b4 100644 --- a/src/sakia/data/processors/sources.py +++ b/src/sakia/data/processors/sources.py @@ -32,28 +32,6 @@ class SourcesProcessor: except sqlite3.IntegrityError: self._logger.debug("Source already known : {0}".format(source.identifier)) - async def initialize_sources(self, currency, pubkey, log_stream): - """ - Initialize sources for a given pubkey if no source exists locally - """ - log_stream("Requesting sources") - try: - sources_data = await self._bma_connector.get(currency, bma.tx.sources, - req_args={'pubkey': pubkey}) - - log_stream("Found {0} sources".format(len(sources_data['sources']))) - for i, s in enumerate(sources_data['sources']): - source = Source(currency=currency, pubkey=pubkey, - identifier=s['identifier'], - type=s['type'], - noffset=s['noffset'], - amount=s['amount'], - base=s['base']) - self.commit(source) - log_stream("{0}/{1} sources".format(i, len(sources_data['sources']))) - except errors.DuniterError as e: - raise - def amount(self, currency, pubkey): """ Get the amount value of the sources for a given pubkey