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

query stake-distribution: add --output-{json,text} flags #743

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Apr 26, 2024

Changelog

- description: |
    query stake-distribution: add --output-{json,text} flags
# uncomment types applicable to the change:
  type:
  - feature        # introduces a new feature
  - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Fixes #739

How to trust this PR

I tested this PR's behavior on IntersectMBO/cardano-node#5803. You can see the comparison of the before/after states here: test_743.zip

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Self-reviewed the diff

@smelc smelc force-pushed the smelc/query-stake-distribution-control-output-format branch from 3d72dae to f6edb1d Compare April 26, 2024 15:51
@smelc smelc marked this pull request as ready for review April 26, 2024 15:54
@palas
Copy link
Contributor

palas commented Apr 26, 2024

@smelc, the test_743.zip file you attached seems to only have empty folders

Copy link
Contributor

@palas palas left a comment

Choose a reason for hiding this comment

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

Thanks 👍. It seems a completely uncontroversial PR to me

[ serialiseToBech32 poolId
, " "
, Text.pack $ showEFloat (Just 3) (fromRational stakeFraction :: Double) ""
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Outside of this PR. But I was thinking it would be simpler, nicer, more reusable, and fun to have a

drawTable :: [[String]] -> String

function instead.

@smelc
Copy link
Contributor Author

smelc commented Apr 29, 2024

@smelc, the test_743.zip file you attached seems to only have empty folders

Urrgh indeed, I had forgotten the -r flag. I reuploaded it 👌

@smelc smelc force-pushed the smelc/query-stake-distribution-control-output-format branch from f6edb1d to fecb4cc Compare April 29, 2024 08:33
@smelc smelc enabled auto-merge April 29, 2024 08:34
@smelc smelc added this pull request to the merge queue Apr 29, 2024
Merged via the queue into main with commit 8d97919 Apr 29, 2024
20 of 21 checks passed
@smelc smelc deleted the smelc/query-stake-distribution-control-output-format branch April 29, 2024 08:57
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.

query stake-distribution should have --output-{text,json} flags
2 participants