Account->AccountSharedData (#15691)

This commit is contained in:
Jeff Washington (jwash)
2021-03-09 15:06:07 -06:00
committed by GitHub
parent 61c7ce857e
commit 8a3135d17b
71 changed files with 2032 additions and 1161 deletions

View File

@@ -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