diff --git a/bigchaindb/utils.py b/bigchaindb/utils.py index f87916b7..f339edbe 100644 --- a/bigchaindb/utils.py +++ b/bigchaindb/utils.py @@ -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?