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

Instruction member function #8801

Merged
merged 2 commits into from
Mar 12, 2020

Conversation

jackcmay
Copy link
Contributor

Problem

visit_instruction_accounts_once is an Instruction specific function that may be used by others (and will be by cross-program-invocations

Summary of Changes

Make it a member function and add test

Fixes #

@jackcmay jackcmay added the CI Pull Request is ready to enter CI label Mar 11, 2020
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Mar 11, 2020
@@ -201,6 +201,26 @@ impl CompiledInstruction {
pub fn program_id<'a>(&self, program_ids: &'a [Pubkey]) -> &'a Pubkey {
&program_ids[self.program_id_index as usize]
}

/// Visit each unique instruction account index once
pub fn visit_instruction_accounts_once(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visit_each_account()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@codecov
Copy link

codecov bot commented Mar 12, 2020

Codecov Report

Merging #8801 into master will decrease coverage by <.1%.
The diff coverage is 100%.

@@           Coverage Diff            @@
##           master   #8801     +/-   ##
========================================
- Coverage    79.9%   79.9%   -0.1%     
========================================
  Files         261     261             
  Lines       56579   56598     +19     
========================================
+ Hits        45227   45241     +14     
- Misses      11352   11357      +5

@jackcmay jackcmay merged commit deaf3cb into solana-labs:master Mar 12, 2020
@jackcmay jackcmay deleted the instruction-member-function branch March 12, 2020 16:08
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.

3 participants