(cherry picked from commit 9760fded2d
)
Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
This commit is contained in:
@ -507,20 +507,6 @@ pub fn to_account<S: Sysvar, T: WritableAccount>(sysvar: &S, account: &mut T) ->
|
|||||||
bincode::serialize_into(account.data_as_mut_slice(), sysvar).ok()
|
bincode::serialize_into(account.data_as_mut_slice(), sysvar).ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return the information required to construct an `AccountInfo`. Used by the
|
|
||||||
/// `AccountInfo` conversion implementations.
|
|
||||||
impl solana_program::account_info::Account for AccountSharedData {
|
|
||||||
fn get(&mut self) -> (&mut u64, &mut [u8], &Pubkey, bool, Epoch) {
|
|
||||||
(
|
|
||||||
&mut self.lamports,
|
|
||||||
&mut self.data,
|
|
||||||
&self.owner,
|
|
||||||
self.executable,
|
|
||||||
self.rent_epoch,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Return the information required to construct an `AccountInfo`. Used by the
|
/// Return the information required to construct an `AccountInfo`. Used by the
|
||||||
/// `AccountInfo` conversion implementations.
|
/// `AccountInfo` conversion implementations.
|
||||||
impl solana_program::account_info::Account for Account {
|
impl solana_program::account_info::Account for Account {
|
||||||
@ -535,11 +521,6 @@ impl solana_program::account_info::Account for Account {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create `AccountInfo`s
|
|
||||||
pub fn create_account_infos(accounts: &mut [(Pubkey, AccountSharedData)]) -> Vec<AccountInfo> {
|
|
||||||
accounts.iter_mut().map(Into::into).collect()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Create `AccountInfo`s
|
/// Create `AccountInfo`s
|
||||||
pub fn create_is_signer_account_infos<'a>(
|
pub fn create_is_signer_account_infos<'a>(
|
||||||
accounts: &'a mut [(&'a Pubkey, bool, &'a mut Account)],
|
accounts: &'a mut [(&'a Pubkey, bool, &'a mut Account)],
|
||||||
|
Reference in New Issue
Block a user