Merge branch 'geoff/data-success' into 'master'

Add success field to transactions_all_data

See merge request grassrootseconomics/cic-internal-integration!163
This commit is contained in:
Geoff Turk 2021-05-20 10:28:07 +00:00
commit 78ff58c1a2
2 changed files with 2 additions and 1 deletions

View File

@ -125,6 +125,7 @@ class DataCache(Cache):
'to_value': int(r['to_value']), 'to_value': int(r['to_value']),
'source_token': r['source_token'], 'source_token': r['source_token'],
'destination_token': r['destination_token'], 'destination_token': r['destination_token'],
'success': r['success'],
'tx_type': tx_type, 'tx_type': tx_type,
} }

View File

@ -42,7 +42,7 @@ def list_transactions_mined_with_data(
:result: Result set :result: Result set
:rtype: SQLAlchemy.ResultProxy :rtype: SQLAlchemy.ResultProxy
""" """
s = "SELECT tx_hash, block_number, date_block, sender, recipient, from_value, to_value, source_token, destination_token, domain, value FROM tx LEFT JOIN tag_tx_link ON tx.id = tag_tx_link.tx_id LEFT JOIN tag ON tag_tx_link.tag_id = tag.id WHERE block_number >= {} AND block_number <= {} ORDER BY block_number ASC, tx_index ASC".format(offset, end) s = "SELECT tx_hash, block_number, date_block, sender, recipient, from_value, to_value, source_token, destination_token, success, domain, value FROM tx LEFT JOIN tag_tx_link ON tx.id = tag_tx_link.tx_id LEFT JOIN tag ON tag_tx_link.tag_id = tag.id WHERE block_number >= {} AND block_number <= {} ORDER BY block_number ASC, tx_index ASC".format(offset, end)
r = session.execute(s) r = session.execute(s)
return r return r