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

Refactor: InstructionAccount indices #22165

Merged

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Dec 29, 2021

Problem

The property index of InstructionAccount should be called index_in_transaction.
Also, we currently search for the index_in_caller in the program runtime multiple times and could be reusing them.
Thus it makes sense to introduce an index_in_caller property as well.

Summary of Changes

  • Splits index of InstructionAccount into index_in_transaction and index_in_caller.
  • Adds more helpers and convenience methods to transaction_context.rs

Fixes #

@codecov
Copy link

codecov bot commented Dec 30, 2021

Codecov Report

Merging #22165 (aef014d) into master (29edb13) will decrease coverage by 0.0%.
The diff coverage is 33.5%.

@@            Coverage Diff            @@
##           master   #22165     +/-   ##
=========================================
- Coverage    81.1%    81.0%   -0.1%     
=========================================
  Files         523      523             
  Lines      146370   146459     +89     
=========================================
+ Hits       118747   118762     +15     
- Misses      27623    27697     +74     

@Lichtso Lichtso merged commit edb20d6 into solana-labs:master Dec 30, 2021
@Lichtso Lichtso deleted the refactor/instruction_account_indices branch December 30, 2021 14:46
@Lichtso Lichtso mentioned this pull request Jan 9, 2022
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