feat(shed): lotus-shed miner list-balances#12984
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the "list-balances" command to lotus-shed to provide a quick overview of miner balances and their quality adjusted power.
- Added a new command (minerListBalancesCmd) to list miner balances along with QAP data.
- Integrated the "must" helper and iterates over miner claims to compute and display the lowest balance encountered.
Comments suppressed due to low confidence (2)
cmd/lotus-shed/miner.go:915
- [nitpick] Consider renaming 'lowest' to 'minBalance' to more clearly indicate that this variable tracks the minimum available balance across miners.
if lowest == nil || balance.LessThan(*lowest) {
cmd/lotus-shed/miner.go:903
- [nitpick] Consider refining this header output to ensure that the CSV formatting is clear, such as by explicitly defining delimiters or quoting fields if needed.
fmt.Printf("Miner Address,QAP (bytes),Available Balance (FIL)\n")
rjan90
approved these changes
Mar 28, 2025
8 tasks
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.
I threw this together just cause I wanted some quick stats but it's a pattern I've had to do a couple of times so having this in shed might make for a good example.