This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Cleanup: InvokeContext accessors#21574
Merged
Lichtso merged 9 commits intosolana-labs:masterfrom Dec 3, 2021
Merged
Conversation
cdf180c to
bb148fe
Compare
Codecov Report
@@ Coverage Diff @@
## master #21574 +/- ##
=======================================
Coverage 81.6% 81.6%
=======================================
Files 506 506
Lines 142289 142275 -14
=======================================
- Hits 116137 116135 -2
+ Misses 26152 26140 -12 |
jbiseda
pushed a commit
to jbiseda/solana
that referenced
this pull request
Dec 6, 2021
* Removes blockhash accessors from InvokeContext. * Removes lamports_per_signature accessors from InvokeContext. * Removes return_data accessors from InvokeContext. * Removes feature_set accessor from InvokeContext. * Removes instruction_recorders and instruction_index accessors from InvokeContext. * Moves get_sysvars() into InvokeContext. * Removes compute_meter parameter from InvokeContext::new(). * Removes InvokeContext::new_mock_with_sysvars_and_features(). * Removes InvokeContext::update_timing().
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Now, that the
dyn TraitofInvokeContextis out of the way, many trivial accessors can be removed.Summary of Changes
blockhashaccessorslamports_per_signatureaccessorsreturn_dataaccessorsfeature_setaccessorinstruction_recordersandinstruction_indexaccessorsget_sysvars()intoInvokeContext.compute_meterparameter fromInvokeContext::new().InvokeContext::new_mock_with_sysvars_and_features().InvokeContext::update_timing().Fixes #