Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Refactor: Remove program_id from process_instruction() #20540

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Oct 8, 2021

Problem

The parameter program_id: &Pubkey is redundant as it is stored in InvokeContext::invoke_stack anyway.

Summary of Changes

Removes the parameter program_id: &Pubkey from process_instruction().

Fixes #

@Lichtso Lichtso force-pushed the refactor/remove_program_id_from_process_instruction branch from b1bbb5d to d688fb2 Compare October 8, 2021 11:32
@Lichtso Lichtso force-pushed the refactor/remove_program_id_from_process_instruction branch from d688fb2 to ac461f8 Compare October 8, 2021 17:52
@Lichtso Lichtso force-pushed the refactor/remove_program_id_from_process_instruction branch from ac461f8 to 68982a3 Compare October 8, 2021 18:05
@Lichtso Lichtso force-pushed the refactor/remove_program_id_from_process_instruction branch from 68982a3 to 4e9909f Compare October 10, 2021 15:29
@Lichtso Lichtso force-pushed the refactor/remove_program_id_from_process_instruction branch from 4e9909f to 655bfe2 Compare October 10, 2021 16:57
@Lichtso Lichtso force-pushed the refactor/remove_program_id_from_process_instruction branch from 655bfe2 to ecf83c7 Compare October 10, 2021 18:27
@codecov
Copy link

codecov bot commented Oct 10, 2021

Codecov Report

Merging #20540 (ecf83c7) into master (bdf8b1d) will decrease coverage by 0.0%.
The diff coverage is 96.7%.

@@            Coverage Diff            @@
##           master   #20540     +/-   ##
=========================================
- Coverage    82.0%    82.0%   -0.1%     
=========================================
  Files         494      494             
  Lines      137478   137480      +2     
=========================================
- Hits       112804   112796      -8     
- Misses      24674    24684     +10     

@Lichtso Lichtso merged commit f30f3bd into solana-labs:master Oct 10, 2021
@Lichtso Lichtso deleted the refactor/remove_program_id_from_process_instruction branch October 10, 2021 20:29
@Lichtso Lichtso mentioned this pull request Nov 9, 2021
dankelleher pushed a commit to identity-com/solana that referenced this pull request Nov 24, 2021
…0540)

* Replaces usage of program_id parameter by invoke_context.get_caller()?.

* Removes "pubkey: &Pubkey" parameter from "process_instruction()".
frits-metalogix added a commit to identity-com/solana that referenced this pull request Nov 24, 2021
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