HomePhabricator

[chronik-client] Move appendWsUrls out of the class as a public function

Description

[chronik-client] Move appendWsUrls out of the class as a public function

Summary:
Move appendWsUrls out of FailoverProxy class and export as an independent function.

Rationale:

Code simplification - the function does not depend on any internal state of FailoverProxy
Make the function reusable outside FailoverProxy scope, especially in the new node selection (ping) feature

Regarding function location:

Although the function is separated from the class, keeping it in failoverProxy.ts is reasonable because:
The function was originally designed to handle proxy URLs and is closely tied to the Endpoint interface, which is still defined in failoverProxy.ts

Note: The function is only used in tests, not found in other directories, so only need to adjust the import in test.ts.

Test Plan: npm test

Reviewers: Fabien, bytesofman, emack, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc

Subscribers: Fabien

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

Details

Provenance
alitayinAuthored on Tue, Apr 15, 09:05
alitayinPushed on Tue, Apr 15, 10:35
Reviewer
Restricted Owners Package
Differential Revision
D17935: [chronik-client] Move appendWsUrls out of the class as a public function
Parents
rABC147451e8d798: assumeutxo: Check deserialized coins for out of range values
Branches
Unknown
Tags
Unknown