-
Notifications
You must be signed in to change notification settings - Fork 39
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
Optional metric for era points of specified validator #2361
base: master
Are you sure you want to change the base?
Conversation
std::move(registry), | ||
std::move(hasher)); | ||
} | ||
return nullptr; |
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 strongly disagree with the case of sptr being initialized with nullptr.
A possible solution could be wrapping it with an optional.
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 agree. Signature of the function could be just optional<shared_ptr<...>>
std::move(registry), | ||
std::move(hasher)); | ||
} | ||
return nullptr; |
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 agree. Signature of the function could be just optional<shared_ptr<...>>
Co-authored-by: Igor Egorov <igor@qdrvm.io>
Co-authored-by: Igor Egorov <igor@qdrvm.io>
Referenced issues
If validator-id is provided by cli, metric of it's era points in current era appears. Info about active era, list of validators in it and their points are taken from storage. Once a minute it's set in gauge in same registry as other metrics. If id is not validator anymore it's era points number is considered 0.
Description of the Change
Possible Drawbacks
Checklist Before Opening a PR
Before you open a Pull Request (PR), please make sure you've completed the following steps and confirm by answering 'Yes' to each item: