Skip to content

Updates docs for Bank::set_capitalization() #6890

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

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

brooksprumo
Copy link

@brooksprumo brooksprumo commented Jul 8, 2025

Problem

Bank::set_capitalization() and Bank::calculate_capitalization() should be DCOU, but solana-program-test currently prevents that. The doc comments should indicate as such, and we can rename the fns to make that clear.

Summary of Changes

Update the docs and rename the fns so it is clear they should only be called by tests/dcou.

@brooksprumo brooksprumo self-assigned this Jul 8, 2025
@brooksprumo brooksprumo force-pushed the capitalization/doc branch from 31b70ed to 57dc933 Compare July 8, 2025 22:48
/// (cannot be made DCOU due to snapshot-minimizer)
pub fn set_capitalization(&self, capitalization: u64) {
/// (cannot be made DCOU due to solana-program-test)
pub fn set_capitalization_for_tests(&self, capitalization: u64) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _for_tests suffix is the idiomatic naming in the monorepo.

@brooksprumo brooksprumo marked this pull request as ready for review July 8, 2025 23:16
@brooksprumo brooksprumo requested review from HaoranYi and roryharr July 8, 2025 23:17
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 98.91304% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.2%. Comparing base (833b05b) to head (57dc933).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #6890    +/-   ##
========================================
  Coverage    83.2%    83.2%            
========================================
  Files         852      852            
  Lines      376951   377017    +66     
========================================
+ Hits       313888   314005   +117     
+ Misses      63063    63012    -51     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@brooksprumo brooksprumo merged commit 33f060d into anza-xyz:master Jul 9, 2025
41 checks passed
@brooksprumo brooksprumo deleted the capitalization/doc branch July 9, 2025 15:04
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.

3 participants