Rent account passed to loader can be read-only (#13997) (#14000)

(cherry picked from commit 20c0e8793e)

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2020-12-09 07:52:49 +00:00
committed by GitHub
parent 3687dccda6
commit fb9f35d2f0

View File

@ -47,7 +47,7 @@ pub fn write(
pub fn finalize(account_pubkey: &Pubkey, program_id: &Pubkey) -> Instruction {
let account_metas = vec![
AccountMeta::new(*account_pubkey, true),
AccountMeta::new(rent::id(), false),
AccountMeta::new_readonly(rent::id(), false),
];
Instruction::new(*program_id, &LoaderInstruction::Finalize, account_metas)
}