-
Notifications
You must be signed in to change notification settings - Fork 17
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
Make query pool-state
default to returning information on all pools
#514
Conversation
query pool-state
default to returning information on all pools; clarify flagsquery pool-state
default to returning information on all pools
@@ -216,7 +216,7 @@ pQueryPoolStateCmd envCli = | |||
<$> pSocketPath envCli | |||
<*> pConsensusModeParams | |||
<*> pNetworkId envCli | |||
<*> many (pStakePoolVerificationKeyHash Nothing) | |||
<*> pAllStakePoolsOrOnly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job being able to reuse the same logic as another command 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I might extend that logic to some other commands as well in another PR. There's also potential to sharpen it some more, and make it require the --all_...
flag, or a positive number of keys.
All -> Nothing | ||
Only poolIds -> Just $ Set.fromList poolIds | ||
|
||
result <- lift (queryPoolState beo poolFilter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you see that passing Nothing
means "no-filtering"? Looking up the definition of QueryPoolState
, it's not documented. (I don't see what other behavior Nothing
could have, but being curious).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code diving in consensus...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job finding that in consensus Carl! We should start adding docs in API for queries arguments to not loose that information.
LGTM 🍾 @carlhammann> were you able to test the new "all" behavior on a true node? |
That I'll do now, but I wanted to open the PR anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
It works, with the |
Changelog
Context
This PR closes #496. I also took the liberty of making the flags of the
pool-state
query a bit more explicit, with an--all-stake-pools
flag. This is similar to thestake-snapshot
query.There's also a remark from @CarlosLopezDeLara on the issue, where he notes that the query doesn't seem to work in Babbage. Before we figure out what's going on there, I propose we proceed with this PR, since it is orthogonal.
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist