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

Removes unnecessary AccountsDb::new_with_config_for_tests() #34485

Conversation

brooksprumo
Copy link
Contributor

Problem

There are too many AccountsDb constructors. AccountsDb::new_with_config_for_tests() is unnecessary. Almost all of the callers can use AccountsDb::new_single_for_tests() instead. And the remaining lone call site can do a tiny bit more.

Summary of Changes

Remove AccountsDb::new_with_config_for_tests() and update callers.

@brooksprumo brooksprumo self-assigned this Dec 15, 2023
@brooksprumo brooksprumo marked this pull request as ready for review December 15, 2023 17:56
@brooksprumo brooksprumo requested a review from steviez December 15, 2023 17:56
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Merging #34485 (1ceef08) into master (a58e462) will decrease coverage by 0.1%.
Report is 2 commits behind head on master.
The diff coverage is 100.0%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34485     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%     
=========================================
  Files         819      819             
  Lines      220907   220801    -106     
=========================================
- Hits       180823   180707    -116     
- Misses      40084    40094     +10     

Copy link
Contributor

@steviez steviez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brooksprumo brooksprumo merged commit cbe8a02 into solana-labs:master Dec 18, 2023
34 checks passed
@brooksprumo brooksprumo deleted the accounts/ctor-refactor/accounts_db_new_with_config_for_tests-on-master branch December 18, 2023 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants