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

Only allow BankForks creation with single bank #34449

Merged
merged 8 commits into from
Dec 14, 2023

Conversation

steviez
Copy link
Contributor

@steviez steviez commented Dec 13, 2023

Problem

BankForks has two constructors; one that takes a single Bank (the root) and one that can take an arbitrary number of Banks plus the root slot. However, the constructor that accepts multiple banks is unnecessary; it isn't used in production and is only used in several tests.

Summary of Changes

  • Remove the BankForks constructor that allows multiple bank
  • Update unit tests that used the multi-bank constructor

rpc/src/rpc.rs Show resolved Hide resolved
rpc/src/rpc.rs Show resolved Hide resolved
runtime/src/bank_forks.rs Outdated Show resolved Hide resolved
runtime/src/bank_forks.rs Outdated Show resolved Hide resolved
runtime/src/bank_forks.rs Outdated Show resolved Hide resolved
@steviez steviez marked this pull request as ready for review December 13, 2023 22:43
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Merging #34449 (9cac54c) into master (2dfcdce) will decrease coverage by 0.1%.
Report is 5 commits behind head on master.
The diff coverage is 97.8%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34449     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%     
=========================================
  Files         819      819             
  Lines      220923   220907     -16     
=========================================
- Hits       180870   180844     -26     
- Misses      40053    40063     +10     

core/src/replay_stage.rs Outdated Show resolved Hide resolved
runtime/src/bank_forks.rs Outdated Show resolved Hide resolved
runtime/src/bank_forks.rs Outdated Show resolved Hide resolved
runtime/src/bank_forks.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@apfitzge apfitzge left a comment

Choose a reason for hiding this comment

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

lgtm

@steviez steviez merged commit ae6a4c0 into solana-labs:master Dec 14, 2023
34 checks passed
@steviez steviez deleted the bf_single_bank_only branch December 14, 2023 16:53
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.

3 participants