Page MenuHomePhabricator

[chronik] Electrum: Implement blockchain.transaction.subscribe endpoint
ClosedPublic

Authored by Fabien on Jun 10 2025, 13:35.

Details

Summary
Test Plan
./test/functional/test_runner.py chronik_electrum_blockchain

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Jun 10 2025, 13:35
PiRK added inline comments.
chronik/chronik-http/src/electrum.rs
1275–1277 ↗(On Diff #54427)

weird layout

1286–1292 ↗(On Diff #54427)

The spec mentions that the value could be null if the tx is unknown (0 is for mempool txs) https://electrum-cash-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain.transaction.get_height

PiRK added inline comments.
chronik/chronik-http/src/electrum.rs
1286–1292 ↗(On Diff #54427)

nvm, the test shows that the behavior is as expected (height can be None which translates to null)

This revision is now accepted and ready to land.Jun 10 2025, 16:40
chronik/chronik-http/src/electrum.rs
1286–1292 ↗(On Diff #54427)

ok() returns the option wrapped value or None, so height can be None