Cleanup runtime use syntax (#8002)
This commit is contained in:
@@ -1,30 +1,35 @@
|
||||
use crate::accounts_db::{
|
||||
AccountInfo, AccountStorage, AccountsDB, AppendVecId, BankHashInfo, ErrorCounters,
|
||||
use crate::{
|
||||
accounts_db::{
|
||||
AccountInfo, AccountStorage, AccountsDB, AppendVecId, BankHashInfo, ErrorCounters,
|
||||
},
|
||||
accounts_index::AccountsIndex,
|
||||
append_vec::StoredAccount,
|
||||
bank::{HashAgeKind, TransactionProcessResult},
|
||||
blockhash_queue::BlockhashQueue,
|
||||
nonce_utils::prepare_if_nonce_account,
|
||||
rent_collector::RentCollector,
|
||||
system_instruction_processor::{get_system_account_kind, SystemAccountKind},
|
||||
transaction_utils::OrderedIterator,
|
||||
};
|
||||
use crate::accounts_index::AccountsIndex;
|
||||
use crate::append_vec::StoredAccount;
|
||||
use crate::bank::{HashAgeKind, TransactionProcessResult};
|
||||
use crate::blockhash_queue::BlockhashQueue;
|
||||
use crate::nonce_utils::prepare_if_nonce_account;
|
||||
use crate::rent_collector::RentCollector;
|
||||
use crate::system_instruction_processor::{get_system_account_kind, SystemAccountKind};
|
||||
use log::*;
|
||||
use rayon::slice::ParallelSliceMut;
|
||||
use solana_sdk::account::Account;
|
||||
use solana_sdk::bank_hash::BankHash;
|
||||
use solana_sdk::clock::Slot;
|
||||
use solana_sdk::hash::Hash;
|
||||
use solana_sdk::native_loader;
|
||||
use solana_sdk::nonce_state::NonceState;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::transaction::Result;
|
||||
use solana_sdk::transaction::{Transaction, TransactionError};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::io::{BufReader, Error as IOError, Read};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::{Arc, Mutex, RwLock};
|
||||
|
||||
use crate::transaction_utils::OrderedIterator;
|
||||
use solana_sdk::{
|
||||
account::Account,
|
||||
bank_hash::BankHash,
|
||||
clock::Slot,
|
||||
hash::Hash,
|
||||
native_loader,
|
||||
nonce_state::NonceState,
|
||||
pubkey::Pubkey,
|
||||
transaction::Result,
|
||||
transaction::{Transaction, TransactionError},
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
io::{BufReader, Error as IOError, Read},
|
||||
path::{Path, PathBuf},
|
||||
sync::{Arc, Mutex, RwLock},
|
||||
};
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
struct ReadonlyLock {
|
||||
@@ -648,26 +653,34 @@ mod tests {
|
||||
// TODO: all the bank tests are bank specific, issue: 2194
|
||||
|
||||
use super::*;
|
||||
use crate::accounts_db::tests::copy_append_vecs;
|
||||
use crate::accounts_db::{get_temp_accounts_paths, AccountsDBSerialize};
|
||||
use crate::bank::HashAgeKind;
|
||||
use crate::rent_collector::RentCollector;
|
||||
use crate::{
|
||||
accounts_db::{
|
||||
tests::copy_append_vecs,
|
||||
{get_temp_accounts_paths, AccountsDBSerialize},
|
||||
},
|
||||
bank::HashAgeKind,
|
||||
rent_collector::RentCollector,
|
||||
};
|
||||
use bincode::serialize_into;
|
||||
use rand::{thread_rng, Rng};
|
||||
use solana_sdk::account::Account;
|
||||
use solana_sdk::epoch_schedule::EpochSchedule;
|
||||
use solana_sdk::fee_calculator::FeeCalculator;
|
||||
use solana_sdk::hash::Hash;
|
||||
use solana_sdk::instruction::CompiledInstruction;
|
||||
use solana_sdk::message::Message;
|
||||
use solana_sdk::nonce_state;
|
||||
use solana_sdk::rent::Rent;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_program;
|
||||
use solana_sdk::transaction::Transaction;
|
||||
use std::io::Cursor;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
use std::{thread, time};
|
||||
use solana_sdk::{
|
||||
account::Account,
|
||||
epoch_schedule::EpochSchedule,
|
||||
fee_calculator::FeeCalculator,
|
||||
hash::Hash,
|
||||
instruction::CompiledInstruction,
|
||||
message::Message,
|
||||
nonce_state,
|
||||
rent::Rent,
|
||||
signature::{Keypair, KeypairUtil},
|
||||
system_program,
|
||||
transaction::Transaction,
|
||||
};
|
||||
use std::{
|
||||
io::Cursor,
|
||||
sync::atomic::{AtomicBool, AtomicU64, Ordering},
|
||||
{thread, time},
|
||||
};
|
||||
use tempfile::TempDir;
|
||||
|
||||
fn load_accounts_with_fee_and_rent(
|
||||
|
Reference in New Issue
Block a user