select_txos needs a join on tx table

This commit is contained in:
Lex Berezhny 2018-10-08 10:53:53 -04:00
parent 9aa22e1071
commit 1d84440b74

View file

@ -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