Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve unit test support for snapshots #2422

Open
canepat opened this issue Oct 15, 2024 · 0 comments
Open

Improve unit test support for snapshots #2422

canepat opened this issue Oct 15, 2024 · 0 comments
Labels
enhancement New feature or improvement

Comments

@canepat
Copy link
Member

canepat commented Oct 15, 2024

We use some sample header/body/transaction snapshots for unit testing, which were generated without any specific automation some time ago and have a slightly custom format, in the sense they start at block 1'500'012 and contain just 2 blocks. See here for more details.

A better overall solution would be:

  • introduce some subcommand in snapshots command-line utility to generate (short) sample snapshots
  • use some other command-line utility (maybe new embed_binary?) to generate C++ code for sample snapshots
  • regenerate sample snapshots without custom start point (i.e. add initial empty blocks)
  • remove IndexBuilder::set_base_data_id as it becomes unnecessary

See also #2419 (comment)

@canepat canepat added the enhancement New feature or improvement label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants
@canepat and others