From ceaa4be6ecf746b6ca8c830566fd50141b23621a Mon Sep 17 00:00:00 2001 From: diminator Date: Fri, 12 May 2017 20:45:43 +0200 Subject: [PATCH] remove redundant statement that causes bugs on complex cc --- bigchaindb/utils.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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?