Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Split runtime utilities out of stake_state.rs #35386

Merged

Conversation

CriesofCarrots
Copy link
Contributor

Problem

solana_stake_program::stake_state is a bit of a kitchen sink; it is difficult to distinguish which parts are critical to the runtime, and which are critical to the existing program processor.

Summary of Changes

Split out the runtime utilities:

  • Split fn calculate_points() and dependencies into a new points module
  • Split fn redeem_rewards() and dependencies into a new rewards module. This is hidden from docs since the only public fn is also hidden.

No functional changes. Only moving code.

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 90.93851% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 81.7%. Comparing base (e8c87e8) to head (fc0f76f).

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #35386     +/-   ##
=========================================
- Coverage    81.8%    81.7%   -0.1%     
=========================================
  Files         834      836      +2     
  Lines      224815   224821      +6     
=========================================
- Hits       183919   183855     -64     
- Misses      40896    40966     +70     

Copy link
Contributor

@joncinque joncinque left a 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! Note that I didn't examine everything super closely, I mainly looked at the functions and test names that were moved

@CriesofCarrots CriesofCarrots merged commit a7f9fe1 into solana-labs:master Mar 1, 2024
35 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants