Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pybitcoin/merkle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
4 changes: 2 additions & 2 deletions pybitcoin/transactions/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -38,4 +38,4 @@ def variable_length_int(i):
elif i < (2**64):
return chr(255) + struct.pack('<Q', i) # pack into 8 bites
else:
raise Exception('Integer cannot exceed 8 bytes in length.')
raise Exception('Integer cannot exceed 8 bytes in length.')