From 04116030780a90944c1133a2f10f5215f0f23369 Mon Sep 17 00:00:00 2001 From: Geoff Turk Date: Wed, 19 May 2021 16:47:22 +0200 Subject: [PATCH] Add success field to transactions_all_data --- apps/cic-cache/cic_cache/cache.py | 1 + apps/cic-cache/cic_cache/db/list.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/cic-cache/cic_cache/cache.py b/apps/cic-cache/cic_cache/cache.py index f0cd2ce2..99a99984 100644 --- a/apps/cic-cache/cic_cache/cache.py +++ b/apps/cic-cache/cic_cache/cache.py @@ -125,6 +125,7 @@ class DataCache(Cache): 'to_value': int(r['to_value']), 'source_token': r['source_token'], 'destination_token': r['destination_token'], + 'success': r['success'], 'tx_type': tx_type, } diff --git a/apps/cic-cache/cic_cache/db/list.py b/apps/cic-cache/cic_cache/db/list.py index e469d66e..62e0a2e0 100644 --- a/apps/cic-cache/cic_cache/db/list.py +++ b/apps/cic-cache/cic_cache/db/list.py @@ -42,7 +42,7 @@ def list_transactions_mined_with_data( :result: Result set :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) return r