More AccountSharedData construction (#15844)
* one more AccountSharedData construction * one more construct
This commit is contained in:
committed by
GitHub
parent
2bf46b789f
commit
c09ea2c314
@ -1,14 +1,14 @@
|
||||
use crate::account::AccountSharedData;
|
||||
use crate::account::{Account, AccountSharedData};
|
||||
|
||||
crate::declare_id!("NativeLoader1111111111111111111111111111111");
|
||||
|
||||
/// Create an executable account with the given shared object name.
|
||||
pub fn create_loadable_account(name: &str, lamports: u64) -> AccountSharedData {
|
||||
AccountSharedData {
|
||||
AccountSharedData::from(Account {
|
||||
lamports,
|
||||
owner: id(),
|
||||
data: name.as_bytes().to_vec(),
|
||||
executable: true,
|
||||
rent_epoch: 0,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user