connector

This commit is contained in:
4tochka 2019-05-04 13:17:09 +04:00
parent 03553c5e8a
commit 31b0d918a7

View File

@ -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)