-
Notifications
You must be signed in to change notification settings - Fork 590
Allow setting custom fixed inflation rate to solana-test-validator #6661
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
Allow setting custom fixed inflation rate to solana-test-validator #6661
Conversation
Add --inflation-fixed <RATE> option to solana-test-validator.
@jstarry is this something we want to enable? |
Yeah makes sense to me and seems useful. Thanks @svenski123! |
Oh can you update the lock files please? You can run this: |
Huh, I didn't realise there were multiple Cargo.lock files in the repo. Anyways I've run that script and pushed the commits. |
Some clippy errors need to be fixed |
Fair enough for clippy to complain about sprintf() when strlcpy() will do (or rather Rust equivalents thereof), but the whole point of negating the operator based comparison result was to handle the unordered IEEE-754 cases correctly... |
Should have mentioned it's ok to ignore some clippy errors, but looks like the partial cmp approach will work fine |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6661 +/- ##
=======================================
Coverage 83.3% 83.3%
=======================================
Files 849 849
Lines 379469 379497 +28
=======================================
+ Hits 316189 316264 +75
+ Misses 63280 63233 -47 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay, lost track of this one
Problem
solana-test-validator allows some configuration of its generated genesis however the inflation is set to the hard-coded default.
Summary of Changes
Add a member to TestValidatorGenesis to allow setting the Inflation object in the generated Genesis.
Add an optional option
--inflation-fixed <RATE>
to solana-test-validator which when specified sets the inflation to Inflation::new_fixed(RATE) instead of the default.