From 40490f23440d54b445ba464e9a3f6d081d14ea11 Mon Sep 17 00:00:00 2001 From: aitbc Date: Thu, 16 Apr 2026 22:09:57 +0200 Subject: [PATCH] Fix explorer UI to use tx_count and broaden pytest discovery - Use tx_count instead of block.transactions.length in latest blocks table - Fix block modal to show tx_count only and remove misleading transaction list rendering - Add root-level pytest.ini with broader test paths including apps/*/tests and tests/ - This fixes the block-detail/rendering mismatch where UI expected transactions array but RPC returns tx_count --- apps/blockchain-explorer/main.py | 29 +++-------------------------- pytest.ini | 10 ++++++++++ 2 files changed, 13 insertions(+), 26 deletions(-) create mode 100644 pytest.ini diff --git a/apps/blockchain-explorer/main.py b/apps/blockchain-explorer/main.py index 6489a45f..3067fa97 100755 --- a/apps/blockchain-explorer/main.py +++ b/apps/blockchain-explorer/main.py @@ -457,7 +457,7 @@ HTML_TEMPLATE = r""" ${block.height} ${block.hash ? block.hash.substring(0, 16) + '...' : '-'} ${formatTimestamp(block.timestamp)} - ${block.transactions ? block.transactions.length : 0} + ${block.tx_count || 0}