From 54774515c283f535699951eeb24782844391b273 Mon Sep 17 00:00:00 2001 From: Pandu Rao Date: Wed, 5 Oct 2016 13:35:00 -0700 Subject: [PATCH 1/2] fix bug in flip_endian function --- pybitcoin/transactions/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybitcoin/transactions/utils.py b/pybitcoin/transactions/utils.py index 1164355..7debc41 100644 --- a/pybitcoin/transactions/utils.py +++ b/pybitcoin/transactions/utils.py @@ -18,7 +18,7 @@ def count_bytes(hex_s): return len(hex_s)/2 def flip_endian(s): - if is_hex: + if is_hex(s): return hexlify(unhexlify(s)[::-1]) return s[::-1] @@ -38,4 +38,4 @@ def variable_length_int(i): elif i < (2**64): return chr(255) + struct.pack(' Date: Wed, 5 Oct 2016 13:36:08 -0700 Subject: [PATCH 2/2] fix bug in MerkleTree --- pybitcoin/merkle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybitcoin/merkle.py b/pybitcoin/merkle.py index c558f38..22aae0b 100644 --- a/pybitcoin/merkle.py +++ b/pybitcoin/merkle.py @@ -60,7 +60,7 @@ def get(self, row_index, column_index): # check to make sure there are enough rows if row_index + 1 > len(self.rows): raise ValueError("There aren't that many rows.") - row = self.rows(row_index) + row = self.rows[row_index] # check to make sure there are enough items in the row if column_index + 1 > len(row): raise ValueError("There aren't that many items in that row.")