Page MenuHomePhabricator

[Cashtab] Batch utxo requests to hydrateUtxos
ClosedPublic

Authored by josephroyking on Fri, Apr 9, 17:24.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC90e09af3d859: [Cashtab] Batch utxo requests to hydrateUtxos
Summary

Group calls to BCH.SLP.Utils.hydrateUtxos by batches of utxos, set by new parameter in Ticker.js, for now to 20 to match typical limit in bch-api. The usual batch size limit of 20 is not correctly implemented for the hydrateUtxos method in bch-api. Instead, it will accept unlimited utxos from up to 20 addresses.

This performance optimization will eventually need to be implemented on bch-api to prevent ddos. In the meantime, implementing it here as Cashtab will need to work with bch-api limits.

Test Plan

npm test; also go ahead and give it an npm start and confirm balance and tokens match what is displayed from cashtabapp.com

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien added a subscriber: Fabien.
Fabien added inline comments.
web/cashtab/src/utils/cashMethods.js
56 ↗(On Diff #28133)

?

This revision is now accepted and ready to land.Mon, Apr 12, 19:22

Remove extra comment, mark mocks as generated