-
Notifications
You must be signed in to change notification settings - Fork 157
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
Ledger API function for stake distribution and pool parameters query #2511
Conversation
* Introduce and export types `RewardParams` and `RewardInfoPool` * The `getRewardInfoPools` function is essentially a refactoring of the `getNonMyopicMemberRewards` function. * Also reorder the functions in the file and export list more thematically.
and `RewardInfoPool`
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.
Looks good to me! Thank you for leaving this module in better shape than you found it, much appreciated!
e652501
to
a1ac597
Compare
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 looks nice, but a few places where the comments need to be updated/clarified!
-- Stake pools and pool rewards | ||
-------------------------------------------------------------------------------- | ||
|
||
-- | Get the /current/ registered stake pool parameters for a given set of |
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.
This haddock is incorrect!
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.
Oops, sorry.
Co-authored-by: Nicholas Clarke <[email protected]>
4e40729
to
2a20edb
Compare
2a20edb
to
2f37bf0
Compare
[CAD-3480] |
Issue Number
CAD-3480
Summary
module
Cardano.Ledger.Shelley.API.Wallet
:RewardParams
andRewardInfoPool
getRewardInfoPools
function is essentially a refactoring of thegetNonMyopicMemberRewards
function.Comments
Exporting
getRewardInfoPools
helps the wallet to calculate reward predictions (e.g. stake pool desirability, non-myopic rewards, but also future reward measures) for stake pools. It's intended to become a local state query in the node.I have made a best effort to conform with the coding conventions in the ledger, but I'm probably off. I did not know where to put the types. Also, I did not know whether or how to write unit tests (though it seems that the old
GetRewardProvenance
does not have many tests either.)