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.") 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('