This repository was archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Refactor bank get vote accounts #3052
Merged
sagar-solana
merged 4 commits into
solana-labs:master
from
sagar-solana:bugfix_leader_conf
Mar 2, 2019
Merged
Refactor bank get vote accounts #3052
sagar-solana
merged 4 commits into
solana-labs:master
from
sagar-solana:bugfix_leader_conf
Mar 2, 2019
Conversation
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
carllin
approved these changes
Mar 2, 2019
Contributor
Author
|
@carllin, thanks for simplifying this. |
garious
approved these changes
Mar 2, 2019
rob-solana
reviewed
Mar 2, 2019
| impl LeaderConfirmationService { | ||
| fn get_last_supermajority_timestamp( | ||
| bank: &Arc<Bank>, | ||
| leader_id: Pubkey, |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there no test for this "exclude the leader from our calculation" case that's broken by this change?
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh there is a test apparently. Something failed. I'll get to it later tonight. Afk now :)
Contributor
|
this is better ;) |
rob-solana
approved these changes
Mar 2, 2019
0c2a5ef to
63bc393
Compare
Codecov Report
@@ Coverage Diff @@
## master #3052 +/- ##
========================================
+ Coverage 76.5% 77.8% +1.3%
========================================
Files 133 133
Lines 20653 20288 -365
========================================
- Hits 15801 15795 -6
+ Misses 4852 4493 -359 |
mvines
pushed a commit
that referenced
this pull request
Mar 3, 2019
AshwinSekar
pushed a commit
to AshwinSekar/solana
that referenced
this pull request
Oct 2, 2024
behzadnouri
pushed a commit
to behzadnouri/solana
that referenced
this pull request
Oct 10, 2024
…olana-labs#3052) (solana-labs#3062) * ci: ignore the tonic audit as a temporary stopgap (solana-labs#3052) (cherry picked from commit 9b5525d) # Conflicts: # ci/do-audit.sh * Fix conflicts * Update to mimic v2.0 change --------- Co-authored-by: Yihau Chen <yihau.chen@icloud.com> Co-authored-by: WillHickey <will.hickey@anza.xyz>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Requiring a closure to filter out elements makes
bank::vote_accountsandaccounts::get_vote_accountsunnecessarily complicated. Instead returning an iterator allows for much more flexibility.Summary of Changes
Refactored the two fns mentioned above, and cleaned up
leader_confirmation_service::get_last_supermajority_timestamp