Let native_loader own native executable accounts

This commit is contained in:
Greg Fitzgerald
2019-02-13 21:16:26 -07:00
committed by Grimes
parent 72b6ec4aa8
commit 48671a1728
2 changed files with 9 additions and 14 deletions

View File

@ -13,11 +13,11 @@ pub fn check_id(program_id: &Pubkey) -> bool {
program_id.as_ref() == NATIVE_LOADER_PROGRAM_ID
}
/// Create an executable account owned by the given program_id and shared object name.
pub fn create_program_account(program_id: Pubkey, name: &str) -> Account {
/// Create an executable account with the given shared object name.
pub fn create_program_account(name: &str) -> Account {
Account {
tokens: 1,
owner: program_id,
owner: id(),
userdata: name.as_bytes().to_vec(),
executable: true,
loader: id(),