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

Cleanup: get_program_key() and get_loader_key() in TransactionContext #23191

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Feb 16, 2022

Problem

get_program_key() on TransactionContext does not tell the user which program accounts key is taken and also prevents the optimization of sharing the current InstructionContext handle with other methods.
See: #23056 (comment)

Summary of Changes

  • Moves get_program_key() from TransactionContext to InstructionContext.
  • Removes get_loader_key().

Fixes #

get_loader_key => get_current_loader_key.
@Lichtso Lichtso added work in progress This isn't quite right yet and removed work in progress This isn't quite right yet labels Feb 16, 2022
@Lichtso Lichtso force-pushed the cleanup/rename_get_current_in_transaction_context branch from 45a3ba7 to 2123a6d Compare February 17, 2022 00:17
@Lichtso Lichtso merged commit da00b39 into solana-labs:master Feb 17, 2022
@Lichtso Lichtso deleted the cleanup/rename_get_current_in_transaction_context branch February 17, 2022 09:16
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Mar 4, 2022
…solana-labs#23191)

* Moves TransactionContext::get_program_key() to InstructionContext::get_program_key().

* Removes TransactionContext::get_loader_key().

* Test full program and loader executable account chain in BPF loader.
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