remove redundant statement that causes bugs on complex cc

This commit is contained in:
diminator 2017-05-12 20:45:43 +02:00
parent 6cb75960b0
commit ceaa4be6ec
No known key found for this signature in database
GPG Key ID: C3D8590E6D0D439A

View File

@ -114,15 +114,9 @@ def condition_details_has_owner(condition_details, owner):
def output_has_owner(output, owner):
# TODO
# Check whether it is really necessary to treat the single key case
# differently from the multiple keys case, and why not just use the same
# function for both cases.
if len(output['public_keys']) > 1:
if len(output['public_keys']) > 0:
return condition_details_has_owner(
output['condition']['details'], owner)
elif len(output['public_keys']) == 1:
return output['condition']['details']['public_key'] == owner
# TODO raise proper exception, e.g. invalid tx payload?