refactor(provider, cli): simplify getting provider for index or range#19440
Merged
refactor(provider, cli): simplify getting provider for index or range#19440
Conversation
joshieDo
reviewed
Nov 4, 2025
Comment on lines
+375
to
+379
| if segment.is_block_based() { | ||
| self.get_segment_provider_for_block(segment, start, None) | ||
| } else { | ||
| self.get_segment_provider_for_transaction(segment, start, None) | ||
| } |
Member
There was a problem hiding this comment.
makes sense, for changesets I think we will want to continue using segment_provider_for_block for getting segments
joshieDo
approved these changes
Nov 4, 2025
…files # Conflicts: # crates/storage/provider/src/providers/static_file/writer.rs
e4891e2 to
1bfb247
Compare
yongkangc
pushed a commit
that referenced
this pull request
Nov 7, 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.
StaticFileProvider::get_segment_providerto deduplicate the logic of getting either block or transaction provider based on the segment.reth db get static-fileCLI by getting the necessary segment provider using index instead of probing all segments starting from the end.