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

This commit is contained in:
Jack May 2020-12-07 11:44:32 -08:00 committed by GitHub
parent dca579851c
commit 20c0e8793e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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)
}