Skip to content

Commit

Permalink
test-validator: Fix upgradeable programs at genesis (#3692)
Browse files Browse the repository at this point in the history
#### Problem

As noted in
https://solana.stackexchange.com/questions/17478/solana-localnet-error-while-upgrading-a-program-loaded-at-genesis-using-solan,
an upgradeable program loaded at genesis is not actually upgradeable,
failing with `instruction changed executable accounts data`. This is
because the program-data account is incorrectly set as "executable",
which it isn't really.

#### Summary of changes

Don't set the program-data account as executable. This is the only place
in the repo where we were doing this incorrectly.
  • Loading branch information
joncinque authored Nov 18, 2024
1 parent dfa1c51 commit 73f54a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test-validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ impl TestValidator {
lamports: Rent::default().minimum_balance(program_data.len()).max(1),
data: program_data,
owner: upgradeable_program.loader,
executable: true,
executable: false,
rent_epoch: 0,
}),
);
Expand Down

0 comments on commit 73f54a0

Please sign in to comment.