connector

This commit is contained in:
4tochka 2019-05-05 20:22:17 +04:00
parent 85b9a7470b
commit 37ba050bbf

View File

@ -594,8 +594,8 @@ class Connector:
if self.tx_handler and not self.cache_loading: if self.tx_handler and not self.cache_loading:
await self.tx_handler(tx, stxo, block_time, block_height, block_index) await self.tx_handler(tx, stxo, block_time, block_height, block_index)
# if self.utxo: if self.utxo:
# self.put_utxo(tx, block_height, block_index) self.put_utxo(tx, block_height, block_index)
self.tx_cache.set(tx["txId"], True) self.tx_cache.set(tx["txId"], True)
try: try:
@ -629,7 +629,7 @@ class Connector:
else: else:
address = b"%s%s" % (bytes([out["nType"]]), out["addressHash"]) address = b"%s%s" % (bytes([out["nType"]]), out["addressHash"])
outpoint = b"%s%s" % (tx["txId"], int_to_bytes(i)) outpoint = b"%s%s" % (tx["txId"], int_to_bytes(i))
self.utxo.set(outpoint, pointer, out["value"], address) # self.utxo.set(outpoint, pointer, out["value"], address)
async def get_stxo(self, tx, block_height, block_index): async def get_stxo(self, tx, block_height, block_index):
stxo, missed = set(), set() stxo, missed = set(), set()