Skip to content

Commit

Permalink
xmr: sign step 03 - permutation length check added
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Oct 3, 2018
1 parent 55a593a commit 8fa4066
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ async def tsx_inputs_permutation(state: State, permutation: list):
"""
Set permutation on the inputs - sorted by key image on host.
"""
state.source_permutation = permutation
if len(permutation) != state.input_count:
raise ValueError('Invalid permutation size')
_check_permutation(permutation)

state.source_permutation = permutation
state.current_input_index = -1

return MoneroTransactionInputsPermutationAck()
Expand Down

0 comments on commit 8fa4066

Please sign in to comment.