From d238cfaac7a782857714fd8e57f66ebbb6e925b6 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Thu, 2 May 2019 00:14:15 +0400 Subject: [PATCH] connector --- pybtc/connector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pybtc/connector.py b/pybtc/connector.py index 6843728..3f321a1 100644 --- a/pybtc/connector.py +++ b/pybtc/connector.py @@ -870,7 +870,9 @@ def decode_block_tx(block): b["header"] = s.read(80).hex() b["bits"] = rh2s(b["bits"]) b["target"] = rh2s(b["target"]) - b["hash"] = double_sha256(b["header"], hex=1) + b["hash"] = double_sha256(b["header"], hex=0) + b["hash"] = rh2s(b["header"]) + b["rawTx"] = {i: Transaction(s, format="raw") for i in range(var_int_to_int(read_var_int(s)))} b["tx"] = [rh2s(b["rawTx"][i]["txId"]) for i in b["rawTx"] ]