1
0

Only compute short_id when requested

This commit is contained in:
наб
2025-06-16 17:16:06 +02:00
parent 60cb94f845
commit 663900270c

View File

@@ -124,9 +124,10 @@ class HistoryNode(CustomNode):
status_str = format_time(int(timestamp))
else:
tx_hash = tx_item['txid']
txpos_in_block = tx_item.get('txpos_in_block')
if txpos_in_block is not None and txpos_in_block >= 0:
short_id = f"{tx_item['height']}x{txpos_in_block}"
if col == HistoryColumns.SHORT_ID:
txpos_in_block = tx_item.get('txpos_in_block', -1)
if txpos_in_block >= 0:
short_id = f"{tx_item['height']}x{txpos_in_block}"
conf = tx_item['confirmations']
try:
status, status_str = self.model.tx_status_cache[tx_hash]