Page MenuHomePhabricator

[chronik] Add blocktxs_and_tx_and_rawtx.rs integration test to bitcoinsuite-chronik-client
ClosedPublic

Authored by hazzarust on Wed, Mar 12, 12:03.

Details

Reviewers
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC18cf3e52f32d: [chronik] Add blocktxs_and_tx_and_rawtx.rs integration test to bitcoinsuite…
Summary

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

  • Block and transaction retrieval by height and hash
  • Transaction validation in mempool and after mining
  • Raw transaction data verification
  • Pagination of block transactions with custom page sizes
  • Error handling for non-existent or invalidated blocks/transactions
  • Proper handling of coinbase transactions

This ensures the Chronik client correctly handles transaction queries and blockchain state changes.

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
blocktxs
Lint
Lint Passed
SeverityLocationCodeMessage
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/blocktxs_and_tx_and_rawtx.rs:438WHITESPACE1Found trailing whitespace(s).
Unit
No Test Coverage
Build Status
Buildable 32709
Build 64906: Build Diffbuild-bitcoinsuite-chronik-client
Build 64905: arc lint + arc unit

Event Timeline

hazzarust created this revision.
hazzarust edited the summary of this revision. (Show Details)
Fabien requested changes to this revision.Wed, Mar 12, 13:39
Fabien added a subscriber: Fabien.
Fabien added inline comments.
modules/bitcoinsuite-chronik-client/tests/blocktxs_and_tx_and_rawtx.rs
221 ↗(On Diff #53041)

Please avoid the boilerplate and make it its own function

This revision now requires changes to proceed.Wed, Mar 12, 13:39

Removed boilerplate and replaced with assert_status_code_eq!()

Still need to add comprehensive comments to explain whats going on within the code, very similar to the TS code - will do this later this evening.

Fabien requested changes to this revision.Thu, Mar 13, 15:27
Fabien added inline comments.
modules/bitcoinsuite-chronik-client/tests/blocktxs_and_tx_and_rawtx.rs
344 ↗(On Diff #53089)

In general don't put comments on the same line as your code. Doing that means that updating the comment changes the line with the code, making it non obvious it's just a comment change. Just move it all on the above line

472 ↗(On Diff #53089)

?

This revision now requires changes to proceed.Thu, Mar 13, 15:27

Added comments from TS implementation into this implementation

This revision is now accepted and ready to land.Fri, Mar 14, 20:36