This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Refactor: Cleanup InvokeContext#20785
Merged
Lichtso merged 10 commits intosolana-labs:masterfrom Oct 21, 2021
Merged
Conversation
6cbfc66 to
20cc79b
Compare
Codecov Report
@@ Coverage Diff @@
## master #20785 +/- ##
=========================================
- Coverage 81.9% 81.8% -0.1%
=========================================
Files 496 496
Lines 138515 138552 +37
=========================================
- Hits 113462 113447 -15
- Misses 25053 25105 +52 |
20cc79b to
b6633ab
Compare
…nvokeContext, in order to add InvokeContext::get_sysvars().
b6633ab to
336b7a4
Compare
Closed
dankelleher
pushed a commit
to identity-com/solana
that referenced
this pull request
Nov 24, 2021
* Move blockhash and fee_calculator in ThisInvokeContext instead of using a reference. * Moves tx_wide_compute_cap into InvokeContext::push(). * Adds ThisInvokeContext::new_mock() constructor. * Adds missing loader account in uses of MockInvokeContext. * Use keyed_account_at_index() when accessing keyed_accounts. * Makes sysvar interface consistent between ThisInvokeContext and MockInvokeContext, in order to add InvokeContext::get_sysvars(). * Adds InvokeContext::set_blockhash() and InvokeContext ::set_fee_calculator(). * Adds new_mock_with_features. * Makes ancestors optional in ThisInvokeContext. * Adds prepare_mock_invoke_context() and mock_process_instruction().
frits-metalogix
added a commit
to identity-com/solana
that referenced
this pull request
Nov 24, 2021
This reverts commit 831df22.
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.
This PR collects various small adjustments around the
InvokeContext,which are required for the upcoming removal of
MockInvokeContext.Changes
ThisInvokeContextandMockInvokeContext, in order to addInvokeContext::get_sysvars().blockhashandfee_calculatorinThisInvokeContextinstead of using a reference.ancestorsoptional inThisInvokeContext.ThisInvokeContext::new_mock()andThisInvokeContext::new_mock_with_features()constructor.prepare_mock_invoke_context()andmock_process_instruction().InvokeContext::set_blockhash()andInvokeContext ::set_fee_calculator().MockInvokeContext.tx_wide_compute_capintoInvokeContext::push().keyed_account_at_index()when accessingkeyed_accounts.