diff --git a/src/sakia/services/blockchain.py b/src/sakia/services/blockchain.py index 38f106ee255b1da95976c88ea09e969f62fe3f3d..18d6953b1b5a63a4a0b2b4f8a4686653eceef865 100644 --- a/src/sakia/services/blockchain.py +++ b/src/sakia/services/blockchain.py @@ -64,22 +64,22 @@ class BlockchainService(QObject): try: self._update_lock = True self.app.refresh_started.emit() - start = self._blockchain_processor.block_number_30days_ago( + start_number = self._blockchain_processor.block_number_30days_ago( self.currency, network_blockstamp ) - if self.current_buid().number > start: - start = self.current_buid().number + 1 + if self.current_buid().number > start_number: + start_number = self.current_buid().number + 1 else: connections = self._connections_processor.connections_to( self.currency ) - time_30days_ago = self._blockchain_processor.rounded_timestamp( - self.currency, start + end_time = self._blockchain_processor.rounded_timestamp( + self.currency, start_number ) self._transactions_service.insert_stopline( - connections, start, time_30days_ago + connections, start_number, end_time ) - self._logger.debug("Parsing from {0}".format(start)) + self._logger.debug("Parsing from {0}".format(start_number)) connections = self._connections_processor.connections_to(self.currency) await self._identities_service.refresh() ( @@ -87,7 +87,7 @@ class BlockchainService(QObject): new_tx, new_dividends, ) = await self._transactions_service.handle_new_blocks( - connections, start, network_blockstamp.number + connections, start_number, network_blockstamp.number ) await self._sources_service.refresh_sources(connections)