From d4f964ef8e6de11372eb2aeae961ca3226fc6e13 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 9 Oct 2018 23:57:41 -0400 Subject: [PATCH] short circuit adding annotations when get_transaction does not return anything --- torba/basedatabase.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/torba/basedatabase.py b/torba/basedatabase.py index 03b353f40..cdbfe08ce 100644 --- a/torba/basedatabase.py +++ b/torba/basedatabase.py @@ -335,6 +335,9 @@ class BaseDatabase(SQLiteMixin): **constraints ) + if not tx_rows: + return [] + txids, txs = [], [] for row in tx_rows: txids.append(row[0])