Account->AccountSharedData (#15691)
This commit is contained in:
committed by
GitHub
parent
61c7ce857e
commit
8a3135d17b
@@ -342,7 +342,7 @@ pub fn process_instruction(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use solana_sdk::{
|
||||
account::{self, Account},
|
||||
account::{self, AccountSharedData},
|
||||
process_instruction::MockInvokeContext,
|
||||
rent::Rent,
|
||||
};
|
||||
@@ -370,27 +370,27 @@ mod tests {
|
||||
.iter()
|
||||
.map(|meta| {
|
||||
RefCell::new(if sysvar::clock::check_id(&meta.pubkey) {
|
||||
account::create_account(&Clock::default(), 1)
|
||||
account::create_account_shared_data(&Clock::default(), 1)
|
||||
} else if sysvar::slot_hashes::check_id(&meta.pubkey) {
|
||||
account::create_account(&SlotHashes::default(), 1)
|
||||
account::create_account_shared_data(&SlotHashes::default(), 1)
|
||||
} else if sysvar::rent::check_id(&meta.pubkey) {
|
||||
account::create_account(&Rent::free(), 1)
|
||||
account::create_account_shared_data(&Rent::free(), 1)
|
||||
} else if meta.pubkey == invalid_vote_state_pubkey() {
|
||||
Account {
|
||||
AccountSharedData {
|
||||
owner: invalid_vote_state_pubkey(),
|
||||
..Account::default()
|
||||
..AccountSharedData::default()
|
||||
}
|
||||
} else {
|
||||
Account {
|
||||
AccountSharedData {
|
||||
owner: id(),
|
||||
..Account::default()
|
||||
..AccountSharedData::default()
|
||||
}
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
|
||||
for _ in 0..instruction.accounts.len() {
|
||||
accounts.push(RefCell::new(Account::default()));
|
||||
accounts.push(RefCell::new(AccountSharedData::default()));
|
||||
}
|
||||
{
|
||||
let keyed_accounts: Vec<_> = instruction
|
||||
|
Reference in New Issue
Block a user