move Account to solana-sdk (#13198)

This commit is contained in:
Jack May
2020-10-28 22:01:07 -07:00
committed by GitHub
parent d5e439037b
commit c458d4b213
38 changed files with 460 additions and 459 deletions

View File

@@ -331,7 +331,10 @@ pub fn process_instruction(
#[cfg(test)]
mod tests {
use super::*;
use solana_sdk::{account::Account, rent::Rent, sysvar::Sysvar};
use solana_sdk::{
account::{self, Account},
rent::Rent,
};
use std::cell::RefCell;
// these are for 100% coverage in this file
@@ -350,11 +353,11 @@ mod tests {
.iter()
.map(|meta| {
RefCell::new(if sysvar::clock::check_id(&meta.pubkey) {
Clock::default().create_account(1)
account::create_account(&Clock::default(), 1)
} else if sysvar::slot_hashes::check_id(&meta.pubkey) {
SlotHashes::default().create_account(1)
account::create_account(&SlotHashes::default(), 1)
} else if sysvar::rent::check_id(&meta.pubkey) {
Rent::free().create_account(1)
account::create_account(&Rent::free(), 1)
} else {
Account::default()
})