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

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

weird layout

1286–1292

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

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

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