Page MenuHomePhabricator

[Cashtab] [Chronik] Deprecate BCH.Blockchain.getBlockCount for node health checks
AbandonedPublic

Authored by emack on Oct 12 2022, 01:03.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Summary

As per deprecation punchlist in T2730, swapping the node status checking call to use chronik in place of bch-js.

Test Plan

.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
deprecateGetBlockCountInUsewallet
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20447
Build 40566: Build Diffcashtab-tests
Build 40565: arc lint + arc unit

Event Timeline

emack requested review of this revision.Oct 12 2022, 01:03
emack retitled this revision from [Cashtab] Deprecate BCH.Blockchain.getBlockCount in useWallet to [Cashtab] [Chronik] Deprecate BCH.Blockchain.getBlockCount in useWallet.Oct 12 2022, 01:05
emack planned changes to this revision.Oct 12 2022, 01:26

On reflection, this diff needs to follow after the implementation of T2631.
Once T2631 is in, and there are no other bch-api calls in T2730, then tryNextAPI() can be removed altogether in this diff. The try/catch block can be amended to trigger user friendly notifs from T2631.

emack retitled this revision from [Cashtab] [Chronik] Deprecate BCH.Blockchain.getBlockCount in useWallet to [Cashtab] [Chronik] Deprecate BCH.Blockchain.getBlockCount for node health checks.Oct 12 2022, 01:27

Need to get all of the transaction creation functions broadcasting with chronik instead of bch-api first. Then we can just completely remove this check, as if chronik is down then update will fail later on.

This check was needed to catch the edge case of the full node behind bch-api failing, but chronik not failing, back when bch-api still handled utxo and tx history. Now, there's no point in moving to a new bch-api server...except that it's still used to send some types of transactions, so we might as well.