From fb9f35d2f06f26f021333a7384b244084cd5c802 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 07:52:49 +0000 Subject: [PATCH] Rent account passed to loader can be read-only (#13997) (#14000) (cherry picked from commit 20c0e8793e589385059f76a61f1dbe6fcb92db23) Co-authored-by: Jack May --- sdk/program/src/loader_instruction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/program/src/loader_instruction.rs b/sdk/program/src/loader_instruction.rs index 17a0c207a2..10183ea5f6 100644 --- a/sdk/program/src/loader_instruction.rs +++ b/sdk/program/src/loader_instruction.rs @@ -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) }