Skip to content
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
Lichtso:cleanup/invoke_context_accessors
Dec 3, 2021
Merged

Cleanup: InvokeContext accessors#21574
Lichtso merged 9 commits intosolana-labs:masterfrom
Lichtso:cleanup/invoke_context_accessors

Conversation

@Lichtso
Copy link
Copy Markdown
Contributor

@Lichtso Lichtso commented Dec 2, 2021

Problem

Now, that the dyn Trait of InvokeContext is out of the way, many trivial accessors can be removed.

Summary of Changes

  • Removes blockhash accessors
  • Removes lamports_per_signature accessors
  • Removes return_data accessors
  • Removes feature_set accessor
  • Removes instruction_recorders and instruction_index accessors
  • Moves get_sysvars() into InvokeContext.
  • Removes compute_meter parameter from InvokeContext::new().
  • Removes InvokeContext::new_mock_with_sysvars_and_features().
  • Removes InvokeContext::update_timing().

Fixes #

@Lichtso Lichtso force-pushed the cleanup/invoke_context_accessors branch from cdf180c to bb148fe Compare December 2, 2021 20:48
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 3, 2021

Codecov Report

Merging #21574 (bb148fe) into master (bf5b7f5) will increase coverage by 0.0%.
The diff coverage is 84.7%.

@@           Coverage Diff           @@
##           master   #21574   +/-   ##
=======================================
  Coverage    81.6%    81.6%           
=======================================
  Files         506      506           
  Lines      142289   142275   -14     
=======================================
- Hits       116137   116135    -2     
+ Misses      26152    26140   -12     

@Lichtso Lichtso merged commit a9d5ef2 into solana-labs:master Dec 3, 2021
@Lichtso Lichtso deleted the cleanup/invoke_context_accessors branch December 3, 2021 11:15
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().
@Lichtso Lichtso mentioned this pull request Jan 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant