Cli: improve vote-account vote-authority display#95
Merged
mergify[bot] merged 4 commits intoanza-xyz:masterfrom Mar 6, 2024
Merged
Cli: improve vote-account vote-authority display#95mergify[bot] merged 4 commits intoanza-xyz:masterfrom
mergify[bot] merged 4 commits intoanza-xyz:masterfrom
Conversation
Author
|
Also, a question: I think the json output of vote authorities should properly be an array (echoes this issue), ie: instead of current: Too breaking to change? (Or maybe okay after v2 version bump?) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #95 +/- ##
=========================================
- Coverage 81.8% 81.8% -0.1%
=========================================
Files 838 838
Lines 225940 225947 +7
=========================================
- Hits 184937 184884 -53
- Misses 41003 41063 +60 |
t-nelson
previously approved these changes
Mar 6, 2024
t-nelson
left a comment
There was a problem hiding this comment.
while part of me wishes it didn't, lgtm 😅
| impl fmt::Display for CliAuthorizedVoters { | ||
| fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
| write!(f, "{:?}", self.authorized_voters) | ||
| if let Some((_epoch, current_authorized_voter)) = self.authorized_voters.first_key_value() { |
There was a problem hiding this comment.
"surely we can't resolve the curre... why the hell do we do all of this superfluous work for every vote?"
| } | ||
| if self.authorized_voters.len() > 1 { | ||
| let (epoch, upcoming_authorized_voter) = | ||
| self.authorized_voters.last_key_value().unwrap(); |
t-nelson
approved these changes
Mar 6, 2024
codebender828
pushed a commit
to codebender828/agave
that referenced
this pull request
Oct 3, 2024
* Simplify vote-authority display * Add handling for new vote authority * Add proper None handling, because unit test (shouldn't happen IRL, though) * Unwrap->expect
OliverNChalk
pushed a commit
to OliverNChalk/agave
that referenced
this pull request
Nov 11, 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
In
solana vote-accountoutput, the Vote Authority line is not clear. It returns a map of one or more numbers to address strings, eg:The number is in fact an epoch, the epoch the respective authority is active. This is usually the current epoch, but in the case of a vote-authority update, it is the epoch in which the new vote authority will go into effect.
Cleaning up small, old Labs issues: solana-labs#11273
Summary of Changes
Simplify normal display:
If a new vote authority has been authorized, display its information, eg:
Fixes solana-labs#11273