Skip to content

Commit

Permalink
fix tron delta update: missing tx hash on trace in deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
soad003 committed Apr 3, 2024
1 parent 882f245 commit aa987f8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [24.02.3/2.2.4] 2024-03-19
### fixed
- tron delta update: missing tx_hash for traces in deployment txs.

## [24.02.3/2.2.3] 2024-03-11
### changed
- Changed number of backoff blocks used in ingestion to avoid spurious data (mostly lowered)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SHELL := /bin/bash
PROJECT := graphsense-lib
VENV := venv
RELEASE := 'v24.02.3'
RELEASESEM := 'v2.2.3'
RELEASE := 'v24.02.4'
RELEASESEM := 'v2.2.4'

all: format lint test build

Expand Down
14 changes: 7 additions & 7 deletions src/graphsenselib/deltaupdate/update/account/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,13 @@ def get_address_prefix(address_str):
address = tdb.to_db_address(address_str)
return (address.db_encoding, address.prefix)

hash_to_id = {
tx.tx_hash: self.consume_transaction_id_composite(
tx.block_id, tx.transaction_index
)
for tx in transactions
}

if currency == "TRX":
transactions = [tx for tx in transactions if tx.to_address is not None]
transactions = [tx for tx in transactions if tx.receipt_status == 1]
Expand All @@ -352,13 +359,6 @@ def get_address_prefix(address_str):
else:
raise ValueError(f"Unknown currency {currency}")

hash_to_id = {
tx.tx_hash: self.consume_transaction_id_composite(
tx.block_id, tx.transaction_index
)
for tx in transactions
}

tx_hashes = [tx.tx_hash for tx in transactions]
reward_traces = [t for t in traces if t.tx_hash is None]
# traces without reward traces:
Expand Down

0 comments on commit aa987f8

Please sign in to comment.