[TieredStorage] Refactor file_size() code path#400
Merged
yhchiang-sol merged 1 commit intoanza-xyz:masterfrom Mar 22, 2024
Merged
[TieredStorage] Refactor file_size() code path#400yhchiang-sol merged 1 commit intoanza-xyz:masterfrom
yhchiang-sol merged 1 commit intoanza-xyz:masterfrom
Conversation
brooksprumo
approved these changes
Mar 22, 2024
Comment on lines
+363
to
+364
| pub fn len(&self) -> usize { | ||
| self.mmap.len() |
There was a problem hiding this comment.
Yay, thanks for making this return usize!
|
In the future, please do not merge PRs before they've completed CI. |
Author
Sure thing. Merging this because it passed the syntax check, and the PR itself doesn't expose any functionalities to other code paths. |
OliverNChalk
pushed a commit
to OliverNChalk/agave
that referenced
this pull request
Nov 11, 2025
`replay_stage_attack.rs` is already big and individual attack configurations are mostly unrelated and do not have to reside directly in the `replay_stage_attack` module. And I would like to add more attack configurations. This split also makes the dependencies more explicit, as the individual attack configuration dependencies are often very different from the dependencies of the `replay_stage_attack::ReplayStageAttack` meta attack itself.
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.
Problem
TieredStorage::file_size() essentially supports AccountsFile::len(),
but its API is inconsistent with AccountsFile's.
Summary of Changes
Refactor TieredStorage::file_size() to ::len() and share the same API
as AccountsFile's.
Test Plan
Build
Existing unit-tests.