Fix InvokeContext::push() account_deps (#17350)

* Reverts aliasing of account_deps with the previous invocation stack frame in InvokeContext::push().
* Adds explicit assert of programdata account content in test_program_bpf_upgrade_via_cpi.
This commit is contained in:
Alexander Meißner
2021-05-21 22:34:07 +02:00
committed by GitHub
parent 9471ba61c5
commit 855ae79598
3 changed files with 34 additions and 25 deletions

View File

@ -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();