Merged
Conversation
decfba5 to
e096dc1
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the block export functionality by converting TestExportRange() from a test function into a standalone executable. This change makes the code more idiomatic and sets the stage for future refactoring work by separating concerns between testing and utility executables.
Key Changes:
- Created new
blockexportpackage with standalone executable for block export functionality - Modified
CreateBlockChanFromLevelDBto accept generic cleanup handler instead oftesting.TB - Updated Taskfile to use
go runinstead ofgo testfor block export operations
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/reexecute/db.go | Updated function signature to accept generic require.TestingT and cleanup handler for broader reusability |
| tests/reexecute/c/vm_reexecute_test.go | Removed test-specific export function and related flags, updated caller to pass cleanup handler |
| tests/reexecute/blockexport/main.go | Added new standalone executable with main function for block export functionality |
| Taskfile.yml | Changed command from go test to go run to execute new blockexport executable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aaronbuchwald
approved these changes
Dec 4, 2025
Collaborator
aaronbuchwald
left a comment
There was a problem hiding this comment.
LGTM - one minor nit
5 tasks
maru-ava
reviewed
Dec 9, 2025
maru-ava
approved these changes
Dec 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this should be merged
Currently,
TestExportRange()is a multi-step process (which doesn't test anything) that's housed inside a unit test - it would be more idiomatic ifTestExportRange()was it's own executable. This PR accomplishes this by makingTestExportRange()into its own executable separate fromBenchmarkReexecuteRange(), eliminating the need to host it in a unit test.Converting
TestExportRange()into an executable also allows us to remove thego benchlogic fromBenchmarkReexecuteRange()in a future PR (#4640) as there can only be onemain()function per package.This PR follows #4638 and precedes #4640.
How this works
Moves the export block range functionality to its own package
blockexport+ updatesTaskfile.ymlto use this new package.How this was tested
CI + ran
task export-cchain-block-rangelocallyNeed to be documented in RELEASES.md?
No