Page MenuHomePhabricator

indexes, refactor: Pass Chain interface instead of CChainState class to indexes
AcceptedPublic

Authored by PiRK on Wed, Feb 26, 15:44.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

Passing abstract Chain interface will let indexes run in separate
processes.

This commit does not change behavior in any way.

This is a partial backport of core#25494
https://github.com/bitcoin/bitcoin/pull/25494/commits/33b4d48cfcdf145f49cb2283ac3e2936a4e23fff
Depends on D17704

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Wed, Feb 26, 15:44

Failed tests logs:

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

------- Stdout: -------
2025-02-26T15:49:25.978000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250226_154716/feature_assumevalid_43
2025-02-26T15:50:42.835000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        self.wait_until(lambda: self.nodes[0].getblockcount() >= COINBASE_MATURITY + 1)
'''
2025-02-26T15:50:42.835000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 149, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 139, in _run_test_internal
    self.run_test()
  File "/work/test/functional/feature_assumevalid.py", line 158, in run_test
    self.wait_until(lambda: self.nodes[0].getblockcount() >= COINBASE_MATURITY + 1)
  File "/work/test/functional/test_framework/test_framework.py", line 874, in wait_until
    return wait_until_helper(
           ^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/util.py", line 296, in wait_until_helper
    raise AssertionError(
AssertionError: Predicate ''''
        self.wait_until(lambda: self.nodes[0].getblockcount() >= COINBASE_MATURITY + 1)
''' not true after 60.0 seconds
2025-02-26T15:50:42.839000Z TestFramework (INFO): Stopping nodes
2025-02-26T15:50:43.050000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250226_154716/feature_assumevalid_43
2025-02-26T15:50:43.050000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250226_154716/feature_assumevalid_43/test_framework.log
2025-02-26T15:50:43.050000Z TestFramework (ERROR): 
2025-02-26T15:50:43.050000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250226_154716/feature_assumevalid_43' to consolidate all logs
2025-02-26T15:50:43.050000Z TestFramework (ERROR): 
2025-02-26T15:50:43.050000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-02-26T15:50:43.050000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2025-02-26T15:50:43.050000Z TestFramework (ERROR):

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

I'll keep looking what's wrong with feature_assumevalid, but it is not related to this diff.

Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/index/base.h
17

You just included the header, no need for the forward declaration

This revision is now accepted and ready to land.Wed, Feb 26, 20:33