HomePhabricator

[Chronik] Add integration test for block_and_blocks endpoint into bitcoinsuite…

Description

[Chronik] Add integration test for block_and_blocks endpoint into bitcoinsuite-chronik-client

Summary:
Depends on D17595 - this diff uses features from D17595 such as the test_runner and handler.

Tests verify block and blocks range retrieval from the Chronik client. They check:

Block retrieval by height and hash.
Block order and consistency in ranges.
Error handling for invalid, parked, or invalidated blocks.
This ensures the Chronik client correctly handles block queries and edge cases.

Added detailed comments from TypeScript tests to Rust code, aligned test logic, and ensured error handling and block order validation.

Use the bitcoinsuite-chronik-client to return the tip height and tip hash length, thus we can compare with the python bitcoin tests and assert if they are equal.

Test Plan:
Please set BUILD_DIR env to export BUILD_DIR="/path/to/build_dir
UNIX: ./contrib/teamcity/build-configurations.py build-bitcoinsuite-chronik-client

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17687

Details

Provenance
hazzarustAuthored on Sat, Feb 22, 13:57
hazzarustPushed on Wed, Mar 5, 15:04
Reviewer
Restricted Owners Package
Differential Revision
D17687: [Chronik] Add integration test for block_and_blocks endpoint into bitcoinsuite-chronik-client
Parents
rABC3bca6fa41005: [avalanche] Add the finalized transactions ancestors to the list of recently…
Branches
Unknown
Tags
Unknown