Page MenuHomePhabricator

test: rename CBlockHeader .hash -> .hash_hex for consistency
ClosedPublic

Authored by PiRK on Sep 30 2025, 15:03.

Details

Summary

Note that we unfortunately can't use a scripted diff here, as the
.hash symbol is also used for other instances (e.g. CInv)

This is a partial backport of core#32868
https://github.com/bitcoin/bitcoin/pull/32868/commits/2118301d77c20e31e8c280ed3bf3c7d67c07d3ca.

Depends on D18740

Test Plan

ninja check-functional-extended
chronik-client-integration-tests
build-chronik-plugins

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

@bot chronik-client-integration-tests build-chronik-plugins

Failed tests logs:

====== Bitcoin ABC functional tests: chronik_mempool_disconnectpool.py ======

------- Stdout: -------
2025-09-30T15:51:28.464000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-chronik-plugins/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20250930_154923_57966/chronik_mempool_disconnectpool_183
2025-09-30T15:51:29.297000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 142, in _run_test_internal
    self.run_test()
  File "/work/test/functional/chronik_mempool_disconnectpool.py", line 98, in run_test
    chronik.tx(tx1.txid_hex).ok().block.hash_hex[::-1].hex(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'BlockMetadata' object has no attribute 'hash_hex'
2025-09-30T15:51:29.348000Z TestFramework (INFO): Stopping nodes
2025-09-30T15:51:29.499000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-chronik-plugins/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20250930_154923_57966/chronik_mempool_disconnectpool_183
2025-09-30T15:51:29.499000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-chronik-plugins/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20250930_154923_57966/chronik_mempool_disconnectpool_183/test_framework.log
2025-09-30T15:51:29.499000Z TestFramework (ERROR): 
2025-09-30T15:51:29.499000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-chronik-plugins/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20250930_154923_57966/chronik_mempool_disconnectpool_183' to consolidate all logs
2025-09-30T15:51:29.499000Z TestFramework (ERROR): 
2025-09-30T15:51:29.499000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-09-30T15:51:29.499000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2025-09-30T15:51:29.499000Z TestFramework (ERROR):
====== Bitcoin ABC functional tests: chronik_resync.py ======

------- Stdout: -------
2025-09-30T15:50:22.346000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-chronik-plugins/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20250930_154923_57966/chronik_resync_35
2025-09-30T15:50:23.359000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 142, in _run_test_internal
    self.run_test()
  File "/work/test/functional/chronik_resync.py", line 43, in run_test
    assert_equal(proto_block.block_info.hash_hex[::-1].hex(), block_hashes[i])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'BlockInfo' object has no attribute 'hash_hex'
2025-09-30T15:50:23.410000Z TestFramework (INFO): Stopping nodes
2025-09-30T15:50:23.511000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-chronik-plugins/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20250930_154923_57966/chronik_resync_35
2025-09-30T15:50:23.511000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-chronik-plugins/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20250930_154923_57966/chronik_resync_35/test_framework.log
2025-09-30T15:50:23.511000Z TestFramework (ERROR): 
2025-09-30T15:50:23.511000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-chronik-plugins/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20250930_154923_57966/chronik_resync_35' to consolidate all logs
2025-09-30T15:50:23.512000Z TestFramework (ERROR): 
2025-09-30T15:50:23.512000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-09-30T15:50:23.512000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2025-09-30T15:50:23.512000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: chronik_mempool_disconnectpool.py
Bitcoin ABC functional tests: chronik_resync.py

fix chronik_mempool_disconnectpool.py and chronik_resync.py

@bot build-chronik-plugins

PiRK published this revision for review.Sep 30 2025, 18:40
This revision is now accepted and ready to land.Oct 1 2025, 08:21