Skip to content

Commit 922d7f3

Browse files
committed
Make system_accounts in instructions readonly
1 parent 6180cb4 commit 922d7f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: solana/write-account/src/instruction.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl core::iter::Iterator for WriteIter<'_> {
116116
accounts: vec![
117117
AccountMeta::new(self.payer, true),
118118
AccountMeta::new(self.write_account, false),
119-
AccountMeta::new(solana_program::system_program::ID, false),
119+
AccountMeta::new_readonly(solana_program::system_program::ID, false),
120120
],
121121
data,
122122
})
@@ -156,7 +156,7 @@ pub fn free(
156156
accounts: vec![
157157
AccountMeta::new(payer, true),
158158
AccountMeta::new(write_account, false),
159-
AccountMeta::new(solana_program::system_program::ID, false),
159+
AccountMeta::new_readonly(solana_program::system_program::ID, false),
160160
],
161161
data: buf[..seed.len() + 3].to_vec(),
162162
})

0 commit comments

Comments
 (0)