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

Fix inversion in --include-stake parser + print "stake" field even when there is no stake (do not hide stake absence) #698

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Apr 5, 2024

Changelog

- description: |
    Fixed `--include-stake` behavior in `query drep-state`
# 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 #623

How to trust this PR

I've tested the behavior of this PR on this branch of cardano-node: see the HEAD of https://github.com/IntersectMBO/cardano-node/commits/smelc/test-of-cli-pull-698/

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • NA New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

smelc added a commit to IntersectMBO/cardano-node that referenced this pull request Apr 5, 2024
@smelc smelc force-pushed the smelc/fix-drep-state-include-stake branch from 9d999c1 to 589d436 Compare April 5, 2024 15:07
<*> pAllOrOnlyDRepHashSoure
<*> Opt.flag WithStake NoStake (mconcat
<*> pAllOrOnlyDRepHashSource
<*> Opt.flag NoStake WithStake (mconcat
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is one of the two important bits of this PR: the arguments to Opt.flag are as follows:

  1. The default value
  2. The modified value

Here the two values were inverted. This change fixes that.

Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM! One minor comment.

cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs Outdated Show resolved Hide resolved
@smelc smelc force-pushed the smelc/fix-drep-state-include-stake branch from d2ffc8a to 4d285f0 Compare April 8, 2024 13:48
@smelc smelc enabled auto-merge April 8, 2024 13:48
smelc added 3 commits April 8, 2024 16:54
Signed-off-by: Clément Hurlin <clement.hurlin@moduscreate.com>
Signed-off-by: Clément Hurlin <clement.hurlin@moduscreate.com>
Signed-off-by: Clément Hurlin <clement.hurlin@moduscreate.com>
@smelc smelc force-pushed the smelc/fix-drep-state-include-stake branch from 4d285f0 to c382c36 Compare April 8, 2024 14:55
@smelc smelc added this pull request to the merge queue Apr 8, 2024
Merged via the queue into main with commit acfa53b Apr 8, 2024
16 checks passed
@smelc smelc deleted the smelc/fix-drep-state-include-stake branch April 8, 2024 15:17
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.

cardano-cli query drep-state issues with --include-stake
2 participants