Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Make Gov2 Curve::threshold fn public #12814

Merged

Conversation

4meta5
Copy link
Contributor

@4meta5 4meta5 commented Dec 1, 2022

Curve::threshold function returns the y value for a given x value on the Gov2 Curve object. This PR changes its visibility from pub(crate) to pub.

Moonbeam is using this function to chart and compare approval/support curves. Currently we have copied pasted the function definition https://github.com/4meta5/gov2-curve-plotter/blob/main/src/curve.rs#L179-L202 but would prefer to call it directly which requires making it public.

@ggwpez ggwpez added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Dec 1, 2022
@bkchr
Copy link
Member

bkchr commented Dec 5, 2022

bot merge

@paritytech-processbot
Copy link

Error: Checks failed for 5bd2a05

@bkchr bkchr merged commit 62a85fb into paritytech:master Dec 5, 2022
@4meta5 4meta5 deleted the amar-pub-gov2-curve-threshold-functions branch December 5, 2022 14:06
ltfschoen pushed a commit to ltfschoen/substrate that referenced this pull request Feb 22, 2023
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants