Skip to content
Snippets Groups Projects
Commit c1044791 authored by inso's avatar inso
Browse files

Use an sha 256 transaction hash

parent 1947aa3d
No related branches found
No related tags found
No related merge requests found
...@@ -162,9 +162,7 @@ class TxHistory(): ...@@ -162,9 +162,7 @@ class TxHistory():
in_outputs = len([o for o in tx.outputs in_outputs = len([o for o in tx.outputs
if o.conditions.left.pubkey == self.wallet.pubkey]) > 0 if o.conditions.left.pubkey == self.wallet.pubkey]) > 0
# We check if the transaction correspond to one we sent tx_hash = hashlib.sha256(tx.signed_raw().encode("ascii")).hexdigest().upper()
# but not from this sakia Instance
tx_hash = hashlib.sha1(tx.signed_raw().encode("ascii")).hexdigest().upper()
# If the wallet pubkey is in the issuers we sent this transaction # If the wallet pubkey is in the issuers we sent this transaction
if in_issuers: if in_issuers:
outputs = [o for o in tx.outputs outputs = [o for o in tx.outputs
...@@ -216,7 +214,7 @@ class TxHistory(): ...@@ -216,7 +214,7 @@ class TxHistory():
for (txid, tx) in enumerate(new_tx): for (txid, tx) in enumerate(new_tx):
transfer = await self._parse_transaction(community, tx, block_doc.blockUID, transfer = await self._parse_transaction(community, tx, block_doc.blockUID,
block_doc.mediantime, received_list, txid+txmax) block_doc.mediantime, received_list, txid+txmax)
if transfer != None: if transfer:
#logging.debug("Transfer amount : {0}".format(transfer.metadata['amount'])) #logging.debug("Transfer amount : {0}".format(transfer.metadata['amount']))
transfers.append(transfer) transfers.append(transfer)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment