Skip to content

Commit

Permalink
Set account executable in the add_builtin method
Browse files Browse the repository at this point in the history
  • Loading branch information
Aursen committed Nov 4, 2024
1 parent fa7ae81 commit 56d195c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/litesvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,10 @@ impl LiteSVM {
self.accounts
.programs_cache
.replenish(program_id, Arc::new(builtin));
self.accounts
.add_account(program_id, AccountSharedData::new(0, 1, &bpf_loader::id()))
.unwrap();

let mut account = AccountSharedData::new(0, 1, &bpf_loader::id());
account.set_executable(true);
self.accounts.add_account(program_id, account).unwrap();
}

/// Adds an SBF program to the test environment from the file specified.
Expand Down

0 comments on commit 56d195c

Please sign in to comment.