HomePhabricator

[chronik] Electrum: implement address.(un)subscribe endpoints

Description

[chronik] Electrum: implement address.(un)subscribe endpoints

Summary:
This diff extracts the subscription method to work with both scripthash and address. The subscription is kept unique between the 2, so we don't get duplicated notifications and any method can be used for unsusbcribing.
However we don't allow overriding the format, i.e. if first subscribed to scripthash then to address, the notification will keep the scripthash format and not be updated (as opposed to fulcrum). This is still compliant with the specification and shouldn't matter in practice.

Test Plan:

./test/functional/test_runner.py chronik_electrum_blockchain

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

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

Details

Provenance
FabienAuthored on May 28 2025, 08:48
FabienPushed on May 29 2025, 14:24
Reviewer
Restricted Project
Differential Revision
D18161: [chronik] Electrum: implement address.(un)subscribe endpoints
Parents
rABCf53a1bd5b254: [Chronik] Add script subscription functionality to websocket.rs in bitcoinsuite…
Branches
Unknown
Tags
Unknown