Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

Commit

Permalink
fix decode/encode bug from pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasV committed Jan 29, 2013
1 parent 15e1ace commit 4d465a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backends/abe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ def get_tx_merkle(self, tx_hash):
# find subset.
# TODO: do not compute this on client request, better store the hash tree of each block in a database...

merkle = map(decode, merkle)
target_hash = decode(tx_hash)
merkle = map(hash_decode, merkle)
target_hash = hash_decode(tx_hash)

s = []
while len(merkle) != 1:
Expand All @@ -528,10 +528,10 @@ def get_tx_merkle(self, tx_hash):
while merkle:
new_hash = Hash(merkle[0] + merkle[1])
if merkle[0] == target_hash:
s.append(encode(merkle[1]))
s.append(hash_encode(merkle[1]))
target_hash = new_hash
elif merkle[1] == target_hash:
s.append(encode(merkle[0]))
s.append(hash_encode(merkle[0]))
target_hash = new_hash
n.append(new_hash)
merkle = merkle[2:]
Expand Down

0 comments on commit 4d465a7

Please sign in to comment.