Skip to content

feat(shed): lotus-shed miner list-balances#12984

Merged
rvagg merged 1 commit intomasterfrom
rvagg/shed-miner-list-balances
Mar 31, 2025
Merged

feat(shed): lotus-shed miner list-balances#12984
rvagg merged 1 commit intomasterfrom
rvagg/shed-miner-list-balances

Conversation

@rvagg
Copy link
Copy Markdown
Member

@rvagg rvagg commented Mar 27, 2025

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.

@github-project-automation github-project-automation Bot moved this to 📌 Triage in FilOz Mar 27, 2025
@rvagg rvagg added the skip/changelog This change does not require CHANGELOG.md update label Mar 27, 2025
@rvagg rvagg requested a review from Copilot March 27, 2025 09:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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")

@github-project-automation github-project-automation Bot moved this from 📌 Triage to ✔️ Approved by reviewer in FilOz Mar 28, 2025
@rvagg rvagg merged commit de21d03 into master Mar 31, 2025
91 of 92 checks passed
@rvagg rvagg deleted the rvagg/shed-miner-list-balances branch March 31, 2025 00:20
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip/changelog This change does not require CHANGELOG.md update

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants