Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
xmr: key image sync hash computation optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Jul 27, 2018
1 parent 7e14253 commit a403e52
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/apps/monero/xmr/key_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ def compute_hash(rr):
:type rr: TransferDetails
:return:
"""
buff = b""
buff += rr.out_key
buff += rr.tx_pub_key
kck = crypto.get_keccak()
kck.update(rr.out_key)
kck.update(rr.tx_pub_key)
if rr.additional_tx_pub_keys:
buff += b"".join(rr.additional_tx_pub_keys)
buff += dump_uvarint_b(rr.internal_output_index)

return crypto.cn_fast_hash(buff)
for x in rr.additional_tx_pub_keys:
kck.update(x)
kck.update(dump_uvarint_b(rr.internal_output_index))
return kck.digest()


async def export_key_image(creds, subaddresses, td):
Expand Down

0 comments on commit a403e52

Please sign in to comment.