Removes unused params from Bank::verify_snapshot_bank()#6986
Merged
brooksprumo merged 1 commit intoanza-xyz:masterfrom Jul 16, 2025
Merged
Removes unused params from Bank::verify_snapshot_bank()#6986brooksprumo merged 1 commit intoanza-xyz:masterfrom
brooksprumo merged 1 commit intoanza-xyz:masterfrom
Conversation
brooksprumo
commented
Jul 16, 2025
| force_clean: bool, | ||
| latest_full_snapshot_slot: Slot, | ||
| _base: Option<(Slot, /*capitalization*/ u64)>, // will be removed next | ||
| duplicates_lt_hash: Option<Box<DuplicatesLtHash>>, |
Author
There was a problem hiding this comment.
Here's the initial/main change: removing the unused params.
| debug_keys: Option<Arc<HashSet<Pubkey>>>, | ||
| additional_builtins: Option<&[BuiltinPrototype]>, | ||
| limit_load_slot_count_from_snapshot: Option<usize>, | ||
| test_hash_calculation: bool, |
Author
There was a problem hiding this comment.
Then here in bank_from_snapshot_archives() we can also remove test_hash_calculation now, and update its callers (the majority of this PR's changes).
| process_options.accounts_db_skip_shrink, | ||
| process_options.accounts_db_force_initial_clean, | ||
| process_options.verify_index, | ||
| false, // verify_index. This will be removed separately. |
Author
There was a problem hiding this comment.
Uh oh... looks like this was wrong before! Luckily these should all be false, but this is clearly an example of what happens when a function has a ton of parameters and they are all the same type...
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6986 +/- ##
=========================================
- Coverage 83.2% 83.2% -0.1%
=========================================
Files 853 853
Lines 375531 375497 -34
=========================================
- Hits 312586 312550 -36
- Misses 62945 62947 +2 🚀 New features to boost your workflow:
|
roryharr
approved these changes
Jul 16, 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.
Problem
Bank::verify_snapshot_bank()has unused parameters that should be removed.Summary of Changes
Remove 'em, and then fix up all callers.