HomePhabricator

[mock-chronik-client] Add support for txid ws subscriptions

Description

[mock-chronik-client] Add support for txid ws subscriptions

Summary:
mock-chronik-client supports websocket sub and unsub methods to support some test cases. Note that mock-chronik-client does not support all websocket features of chronik-client. It is mostly an elaborate stub so we can test things like "the function subscribes as expected."

It's important to match all the methods though so that the Classes (MockChronikClient and ChronikClient) are interchangeable in unit tests.

Test Plan: npm test

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Jun 16 2025, 13:20
bytesofmanPushed on Jun 18 2025, 03:06
Reviewer
Restricted Project
Differential Revision
D18262: [mock-chronik-client] Add support for txid ws subscriptions
Parents
rABCea7e4095322b: refactor: rpc: Pass CBlockIndex by reference instead of pointer
Branches
Unknown
Tags
Unknown