Skip to content

Commit

Permalink
xmr: manual serialization of tx prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Sep 13, 2018
1 parent 9e5e047 commit 6e39801
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/apps/monero/protocol/tsx_sign_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,10 @@ async def gen_hmac_tsxdest(self, dst_entr, idx):
return hmac_tsxdest

def _tprefix_update(self):
from apps.monero.xmr.serialize_messages.tx_prefix import TransactionPrefix

tx_fields = TransactionPrefix.f_specs()
self.tx_prefix_hasher.keep()
self.tx_prefix_hasher.message_field(self.tx, tx_fields[0])
self.tx_prefix_hasher.message_field(self.tx, tx_fields[1])
self.tx_prefix_hasher.container_size(self.num_inputs(), tx_fields[2][1])
self.tx_prefix_hasher.uvarint(self.tx.version)
self.tx_prefix_hasher.uvarint(self.tx.unlock_time)
self.tx_prefix_hasher.container_size(self.num_inputs()) # ContainerType
self.tx_prefix_hasher.release()
self._mem_trace(10, True)

Expand Down

0 comments on commit 6e39801

Please sign in to comment.