Page MenuHomePhabricator

[ecash-herald] Add txids to mocks instead of blocks
ClosedPublic

Authored by bytesofman on Jul 13 2023, 16:51.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC74466c9e5d3c: [ecash-herald] Add txids to mocks instead of blocks
Summary

Simplify testing and mocks by building a mock block of interesting txids instead of relying on existing blocks

As the app grew in complexity, actual API data for some blocks became impractical to store (for example, large utxo sets). This data is not necessary to test app functionality and can be mocked / simplified.

We are really interested in parsing on a per-txid basis, not on a per-block basis. With this new script, we can add new interesting txids to prove that the app parses them, without outsized growth in the legacy blocks.js mock.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
herald-uberblock
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24487
Build 48574: Build Diffecash-herald-tests
Build 48573: arc lint + arc unit

Event Timeline

bytesofman updated this revision to Diff 41439.

Un-bump ecashaddrjs

apps/ecash-herald/test/mocks/block.js
1 ↗(On Diff #41439)

while this file is large, it is ~50% the size of the legacy blocks.js

As new diffs are created, changes to this file will be small and reviewable as they will be on a per-tx basis, so the impact of any given change to ecash-herald can be assessed

This revision is now accepted and ready to land.Jul 15 2023, 08:51