HomePhabricator

[tg bot] Improve how mocks are generated and stored

Description

[tg bot] Improve how mocks are generated and stored

Summary:
T2972

Depends on D13623

It's been a persistent headache that generateMocks uses slightly different syntax / functions than what is used in the app. Some differences are necessary to preserve blockNames, which are useful in developer review and keeping track of why some blocks are mocked. But, in general, we want to be sure that the mocks are generated in exactly the same way that the app is running.

This diff refactors generateMocks to use the new handleBlockConnected function, modified with an optional flag to return mocks.

Test Plan: npm test

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
bytesofmanAuthored on Apr 7 2023, 22:30
bytesofmanPushed on Apr 12 2023, 14:26
Reviewer
Restricted Project
Differential Revision
D13624: [tg bot] Improve how mocks are generated and stored
Parents
rABC8b2bccadd0f3: [herald] Default msg should be in HTML, not markdown
Branches
Unknown
Tags
Unknown