Changes derypt key input type and return

The input types for Blob.encrypt and EncryptedBlob.decrypt were not consistent. The former was in hex whereas the later was in bytes. Format the later in hex for consistency.
This commit is contained in:
Sergi Delgado Segura
2019-10-07 16:34:28 +01:00
parent 76f0b1934a
commit 88532f7345
2 changed files with 4 additions and 3 deletions

View File

@@ -64,8 +64,7 @@ class BlockProcessor:
for uuid in locator_uuid_map[locator]:
try:
# ToDo: #20-test-tx-decrypting-edge-cases
justice_rawtx = appointments[uuid].encrypted_blob.decrypt(binascii.unhexlify(dispute_txid))
justice_rawtx = binascii.hexlify(justice_rawtx).decode()
justice_rawtx = appointments[uuid].encrypted_blob.decrypt(dispute_txid)
justice_txid = bitcoin_cli.decoderawtransaction(justice_rawtx).get('txid')
matches.append((locator, uuid, dispute_txid, justice_txid, justice_rawtx))