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

Add convenience function to make it easier for programs to retrieve the result of GetMinimumDelegation #24175

Merged
merged 7 commits into from
Apr 13, 2022

Conversation

brooksprumo
Copy link
Contributor

@brooksprumo brooksprumo commented Apr 7, 2022

Problem

Getting the value after calling stake instruction GetMinimumDelegation is somewhat cumbersome and potentially prone to error.

Summary of Changes

Add a helper function to get the minimum delegation value.

@brooksprumo brooksprumo added work in progress This isn't quite right yet noCI Suppress CI on this Pull Request labels Apr 7, 2022
programs/bpf/rust/get_minimum_delegation_data/src/lib.rs Outdated Show resolved Hide resolved
programs/bpf/tests/programs.rs Show resolved Hide resolved
programs/bpf/tests/programs.rs Outdated Show resolved Hide resolved
programs/bpf/tests/programs.rs Outdated Show resolved Hide resolved
programs/bpf/tests/programs.rs Outdated Show resolved Hide resolved
@brooksprumo brooksprumo force-pushed the minimum-stake/helper-fn branch 3 times, most recently from 53a6772 to 9e36279 Compare April 11, 2022 21:27
@brooksprumo brooksprumo added CI Pull Request is ready to enter CI and removed work in progress This isn't quite right yet noCI Suppress CI on this Pull Request labels Apr 11, 2022
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Apr 11, 2022
@brooksprumo brooksprumo changed the title wip: add minimum stake/helper fn Add convenience function to make it easier for programs to retrieve the result of GetMinimumDelegation Apr 11, 2022
@brooksprumo brooksprumo force-pushed the minimum-stake/helper-fn branch from 9e36279 to 88c2968 Compare April 11, 2022 21:45
@brooksprumo brooksprumo marked this pull request as ready for review April 11, 2022 23:15
@brooksprumo brooksprumo requested a review from jstarry April 11, 2022 23:16
@brooksprumo brooksprumo requested a review from jstarry April 12, 2022 15:29
sdk/program/src/stake/tools.rs Outdated Show resolved Hide resolved
sdk/program/src/stake/tools.rs Outdated Show resolved Hide resolved
sdk/program/src/stake/tools.rs Outdated Show resolved Hide resolved
sdk/program/src/stake/instruction.rs Outdated Show resolved Hide resolved
@brooksprumo brooksprumo requested a review from jstarry April 12, 2022 21:19
@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #24175 (30a6065) into master (2da4e3e) will increase coverage by 0.1%.
The diff coverage is 78.3%.

@@            Coverage Diff            @@
##           master   #24175     +/-   ##
=========================================
+ Coverage    81.8%    81.9%   +0.1%     
=========================================
  Files         581      582      +1     
  Lines      158312   161467   +3155     
=========================================
+ Hits       129518   132394   +2876     
- Misses      28794    29073    +279     

sdk/program/src/stake/tools.rs Outdated Show resolved Hide resolved
sdk/program/src/stake/tools.rs Outdated Show resolved Hide resolved
@brooksprumo brooksprumo merged commit e146e86 into solana-labs:master Apr 13, 2022
@brooksprumo brooksprumo deleted the minimum-stake/helper-fn branch April 13, 2022 19:41
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.

4 participants