From 1d84440b74d1790927813203566db66bf33946ff Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 8 Oct 2018 10:53:53 -0400 Subject: [PATCH] select_txos needs a join on tx table --- torba/basedatabase.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/torba/basedatabase.py b/torba/basedatabase.py index 637706adc..dc360af47 100644 --- a/torba/basedatabase.py +++ b/torba/basedatabase.py @@ -376,7 +376,9 @@ class BaseDatabase(SQLiteMixin): def select_txos(self, cols, **constraints): return self.run_query(*query( - "SELECT {} FROM txo JOIN pubkey_address USING (address)".format(cols), **constraints + "SELECT {} FROM txo" + " JOIN pubkey_address USING (address)" + " JOIN tx USING (txid)".format(cols), **constraints )) @defer.inlineCallbacks