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

Commit

Permalink
Updates comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed May 13, 2021
1 parent d6a09a6 commit 94c297e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions programs/bpf_loader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@ fn process_loader_upgradeable_instruction(
let buffer = keyed_account_at_index(keyed_accounts, 3)?;
let rent = from_keyed_account::<Rent>(keyed_account_at_index(keyed_accounts, 4)?)?;
let clock = from_keyed_account::<Clock>(keyed_account_at_index(keyed_accounts, 5)?)?;
// TODO [KeyedAccounts to InvokeContext refactoring]
// let _system = keyed_account_at_index(keyed_accounts, 6)?;
let authority = keyed_account_at_index(keyed_accounts, 7)?;
let upgrade_authority_address = Some(*authority.unsigned_key());
let upgrade_authority_signer = authority.signer_key().is_none();
Expand Down
8 changes: 4 additions & 4 deletions runtime/src/message_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ impl<'a> InvokeContext for ThisInvokeContext<'a> {
.chain(self.message.account_keys.iter())
.position(|key| key == *search_key)
.map(|mut index| {
// TODO
// Currently we are constructing new accounts on the stack
// before calling MessageProcessor::process_cross_program_instruction
// Ideally we would recycle the existing accounts here.
if index < self.account_deps.len() {
(
*is_signer,
Expand All @@ -367,10 +371,6 @@ impl<'a> InvokeContext for ThisInvokeContext<'a> {
*is_signer,
*is_writable,
&self.message.account_keys[index],
// TODO
// Currently we are constructing new accounts on the stack
// before calling MessageProcessor::process_cross_program_instruction
// Ideally we would recycle the existing accounts here like this:
// &self.accounts[index] as &RefCell<AccountSharedData>,
transmute_lifetime(*account),
)
Expand Down

0 comments on commit 94c297e

Please sign in to comment.