From 31b0d918a73389ecd9e7495c8f082a5b738b9070 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Sat, 4 May 2019 13:17:09 +0400 Subject: [PATCH] connector --- pybtc/connector.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pybtc/connector.py b/pybtc/connector.py index 18a2a70..ff55506 100644 --- a/pybtc/connector.py +++ b/pybtc/connector.py @@ -457,11 +457,8 @@ class Connector: block["time"], block["height"], i)) - try: - await asyncio.wait_for(self.block_txs_request, timeout=self.block_timeout) - except: - self.log.critical(str(self.await_tx)) - raise + await asyncio.wait_for(self.block_txs_request) + elif tx_bin_list: raise Exception("not emplemted") @@ -577,18 +574,18 @@ class Connector: async def _new_transaction(self, tx, block_time = None, block_height = None, block_index = None): - self.log.debug("1 - %s %s " % (rh2s(tx["txId"]), not(tx["txId"] in self.tx_in_process or self.tx_cache.get(tx["txId"])))) + # self.log.debug("1 - %s %s " % (rh2s(tx["txId"]), not(tx["txId"] in self.tx_in_process or self.tx_cache.get(tx["txId"])))) if not(tx["txId"] in self.tx_in_process or self.tx_cache.get(tx["txId"])): try: stxo = None self.tx_in_process.add(tx["txId"]) if not tx["coinbase"]: if block_height is not None: - self.log.debug("2 - %s " % rh2s(tx["txId"])) + # self.log.debug("2 - %s " % rh2s(tx["txId"])) await self.wait_block_dependences(tx) if self.utxo: stxo = await self.get_stxo(tx, block_height, block_index) - self.log.debug(" - %s " % rh2s(tx["txId"])) + # self.log.debug(" - %s " % rh2s(tx["txId"])) if self.tx_handler and not self.cache_loading: await self.tx_handler(tx, stxo, block_time, block_height, block_index)