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

solana-rent-collector: remove calculation of slots_per_year #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LStan
Copy link
Contributor

@LStan LStan commented Feb 17, 2025

When RentCollector::default() is called (which can actually happen twice per transaction in SVM here and here) GenesisConfig::default() is called which does a lot of computations, including calling SystemTime::now(), but only one constant from it is needed.

This PR removes that call and replaces it with a pre-calculated constant. This constant is checked during testing.

Also removed unnecessary solana-logger dependency from genesis-config Cargo.toml.

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.

1 participant