From 0effe6fa0fd2f0714581b07723884f668462b2ad Mon Sep 17 00:00:00 2001 From: 4tochka Date: Thu, 9 May 2019 18:02:11 +0400 Subject: [PATCH] connector --- pybtc/connector/connector.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pybtc/connector/connector.py b/pybtc/connector/connector.py index 6314c7f..f788e85 100644 --- a/pybtc/connector/connector.py +++ b/pybtc/connector/connector.py @@ -617,16 +617,16 @@ class Connector: for i in tx["vOut"]: if "_s_" in tx["vOut"][i]: self.tt += 1 - # else:else - out = tx["vOut"][i] - # if self.skip_opreturn and out["nType"] in (3, 8): - # continue - pointer = (block_height << 42) + (block_index << 21) + i - try: - address = out["scriptPubKey"] - except: - address = b"".join((bytes([out["nType"]]), out["addressHash"])) - self.utxo.set(b"".join((tx["txId"], int_to_bytes(i))), pointer, out["value"], address) + else: + out = tx["vOut"][i] + # if self.skip_opreturn and out["nType"] in (3, 8): + # continue + pointer = (block_height << 42) + (block_index << 21) + i + try: + address = out["scriptPubKey"] + except: + address = b"".join((bytes([out["nType"]]), out["addressHash"])) + self.utxo.set(b"".join((tx["txId"], int_to_bytes(i))), pointer, out["value"], address) self.tx_cache.set(tx["txId"], True) try: