From f40d1610ab2b06b3d3056667ba18f9a2bb58eeb1 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Thu, 9 May 2019 01:13:52 +0400 Subject: [PATCH] connector --- .../pybtc/connector.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build/lib.macosx-10.9-x86_64-3.7/pybtc/connector.py b/build/lib.macosx-10.9-x86_64-3.7/pybtc/connector.py index 9ff4f36..1152dba 100644 --- a/build/lib.macosx-10.9-x86_64-3.7/pybtc/connector.py +++ b/build/lib.macosx-10.9-x86_64-3.7/pybtc/connector.py @@ -614,15 +614,18 @@ class Connector: if self.utxo: for i in tx["vOut"]: - 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"] + tx["vOut"][i]["__spent__"] except: - address = b"".join((bytes([out["nType"]]), out["addressHash"])) - self.utxo.set(b"".join((tx["txId"], int_to_bytes(i))), pointer, out["value"], address) + 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: