Skip to content

Commit

Permalink
xmr: output index check added in step6
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Oct 17, 2018
1 parent 973c457 commit c27ae90
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/apps/monero/protocol/signing/step_06_set_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ async def set_output(state: State, dst_entr, dst_entr_hmac, rsig_data):
async def _validate(state: State, dst_entr, dst_entr_hmac):
if state.current_input_index + 1 != state.input_count:
raise ValueError("Invalid number of inputs")
if state.current_output_index >= state.output_count:
raise ValueError("Invalid output index")
if dst_entr.amount <= 0:
raise ValueError("Destination with wrong amount: %s" % dst_entr.amount)

Expand Down

0 comments on commit c27ae90

Please sign in to comment.