Skip to content

Conversation

@CriesofCarrots
Copy link

@CriesofCarrots CriesofCarrots commented Apr 2, 2024

Problem

Code for partitioned epoch rewards is peppered throughout bank.rs. It is very hard to trace the flows, and figure out which structs and methods are needed for calculation vs distribution, or for sysvar handling.

Summary of Changes

Moves distribution-related methods to submodule of bank::partitioned_epoch_rewards
Moves unit tests
Includes some re-tightening of method scope in sysvar submodule, since methods are now only used in thie distribution submodule

Best reviewed by commit

This is PR 3 of 5 refactor this section of Bank code. The complete change is visible in a draft PR

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (79e316e) to head (ec75d55).
Report is 10 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master     #528    +/-   ##
========================================
  Coverage    81.8%    81.8%            
========================================
  Files         843      847     +4     
  Lines      228586   228892   +306     
========================================
+ Hits       187124   187407   +283     
- Misses      41462    41485    +23     

@CriesofCarrots CriesofCarrots merged commit 5d53389 into anza-xyz:master Apr 3, 2024
OliverNChalk pushed a commit to OliverNChalk/agave that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

3 participants