solana_sdk/
native_loader.rsuse solana_account::{
Account, AccountSharedData, InheritableAccountFields, DUMMY_INHERITABLE_ACCOUNT_FIELDS,
};
pub use solana_sdk_ids::native_loader::{check_id, id, ID};
pub fn create_loadable_account_with_fields(
name: &str,
(lamports, rent_epoch): InheritableAccountFields,
) -> AccountSharedData {
AccountSharedData::from(Account {
lamports,
owner: id(),
data: name.as_bytes().to_vec(),
executable: true,
rent_epoch,
})
}
pub fn create_loadable_account_for_test(name: &str) -> AccountSharedData {
create_loadable_account_with_fields(name, DUMMY_INHERITABLE_ACCOUNT_FIELDS)
}