Page MenuHomePhabricator

[chronik] Python client: add support for paths in host
ClosedPublic

Authored by Fabien on Aug 12 2025, 10:38.

Details

Summary

So we can support hosts that look like so: https://chronik.foo/xec

We don't use that in tests but it is useful for external scripts relying on this library.

Test Plan

Use it to connect to the public chronik.pay2stay.com/xec

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Aug 12 2025, 10:38
tobias_ruck added a subscriber: tobias_ruck.
tobias_ruck added inline comments.
test/functional/test_framework/chronik/client.py
310–312 ↗(On Diff #55204)

usually this is called "path", not prefix; maybe path_prefix? but if you think this is pretty unambiguous already we can keep prefix

332 ↗(On Diff #55204)

how about just having this be the empty string if no prefix/path? then just just a concatenation

This revision now requires changes to proceed.Aug 12 2025, 10:45

added a suggestion, but no blocker

test/functional/test_framework/chronik/client.py
189–191 ↗(On Diff #55205)

i think this would be cleaner

This revision is now accepted and ready to land.Aug 12 2025, 13:27