HomePhabricator

[alias-server] Handle startup case with its own callback in…

Description

[alias-server] Handle startup case with its own callback in parseWebsocketMessage

Summary:
T3060

parseWebsocketMessage is the main function that updates valid alias registrations. If the server has been shutdown, it is called immediately on app startup to bring the server to the latest chain state.

Otherwise it is always called on receiving a websocket message from chronik. Instead of shimming the special startup case into the BlockConnected callback, define its own callback.

Add TODOs for future functions and logic.

Test Plan: npm test

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
bytesofmanAuthored on Apr 6 2023, 03:28
bytesofmanPushed on Apr 6 2023, 14:21
Reviewer
Restricted Project
Differential Revision
D13592: [alias-server] Handle startup case with its own callback in parseWebsocketMessage
Parents
rABCd67eafd1f39d: [herald] add copyright header to files
Branches
Unknown
Tags
Unknown