HomePhabricator

[Cashtab] Force API switch if full node is offline

Description

[Cashtab] Force API switch if full node is offline

Summary:
When the node behind bch-api goes down, fulcrum and bch-api continue to function although they gradually get out of sync. This prevents the usual error throwing which causes the backends to switch.

This diff performs a node API check each update cycle. If the node is unavailable, the backend will switch.

Test Plan:
Make sure kingbch.com node is down
npm start
Observe that the app immediately switches to the other backend
Start kingbch.com node
Observe that the app works okay

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Sep 15 2022, 13:18
bytesofmanPushed on Sep 22 2022, 19:48
Reviewer
Restricted Project
Differential Revision
D11995: [Cashtab] Force API switch if full node is offline
Parents
rABCc3708b0d0765: [avalanche] Add a BlockFinalized callback to the validation interface
Branches
Unknown
Tags
Unknown