From f64401eed3b005c4420c852d4e9c9bb913c27229 Mon Sep 17 00:00:00 2001 From: Sylvain Bellemare Date: Fri, 3 Mar 2017 17:43:25 +0100 Subject: [PATCH] Only append tx if it meets the conditions fixes #1231 --- bigchaindb/core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bigchaindb/core.py b/bigchaindb/core.py index 9f93d47a..5c72a12b 100644 --- a/bigchaindb/core.py +++ b/bigchaindb/core.py @@ -430,14 +430,13 @@ class Bigchain(object): # check if the owner is in the condition `owners_after` if len(output['public_keys']) == 1: if output['condition']['details']['public_key'] == owner: - tx_link = TransactionLink(tx['id'], index) + links.append(TransactionLink(tx['id'], index)) else: # for transactions with multiple `public_keys` there will be several subfulfillments nested # in the condition. We need to iterate the subfulfillments to make sure there is a # subfulfillment for `owner` if utils.condition_details_has_owner(output['condition']['details'], owner): - tx_link = TransactionLink(tx['id'], index) - links.append(tx_link) + links.append(TransactionLink(tx['id'], index)) return links def get_owned_ids(self, owner):