Remove unused pubkey::Pubkey imports

This commit is contained in:
Michael Vines
2020-10-19 12:23:14 -07:00
parent 17c391121a
commit 959880db60
53 changed files with 243 additions and 115 deletions

View File

@ -2872,8 +2872,12 @@ pub mod tests {
let keypair = Keypair::new();
// Create array of two transactions which throw different errors
let account_not_found_tx =
system_transaction::transfer(&keypair, &solana_sdk::pubkey::new_rand(), 42, bank.last_blockhash());
let account_not_found_tx = system_transaction::transfer(
&keypair,
&solana_sdk::pubkey::new_rand(),
42,
bank.last_blockhash(),
);
let account_not_found_sig = account_not_found_tx.signatures[0];
let mut account_loaded_twice = system_transaction::transfer(
&mint_keypair,
@ -2925,7 +2929,11 @@ pub mod tests {
let bank0 = Arc::new(Bank::new(&genesis_config));
bank0.freeze();
let bank1 = Arc::new(Bank::new_from_parent(&bank0, &solana_sdk::pubkey::new_rand(), 1));
let bank1 = Arc::new(Bank::new_from_parent(
&bank0,
&solana_sdk::pubkey::new_rand(),
1,
));
// The new blockhash is going to be the hash of the last tick in the block
let bank_1_blockhash = bank1.last_blockhash();

View File

@ -2,7 +2,6 @@ pub use solana_runtime::genesis_utils::{
create_genesis_config_with_leader, create_genesis_config_with_leader_ex, GenesisConfigInfo,
BOOTSTRAP_VALIDATOR_LAMPORTS,
};
use solana_sdk::pubkey::Pubkey;
// same as genesis_config::create_genesis_config, but with bootstrap_validator staking logic
// for the core crate tests

View File

@ -77,7 +77,9 @@ mod tests {
#[test]
fn test_leader_schedule_basic() {
let num_keys = 10;
let stakes: Vec<_> = (0..num_keys).map(|i| (solana_sdk::pubkey::new_rand(), i)).collect();
let stakes: Vec<_> = (0..num_keys)
.map(|i| (solana_sdk::pubkey::new_rand(), i))
.collect();
let seed = solana_sdk::pubkey::new_rand();
let mut seed_bytes = [0u8; 32];
@ -93,7 +95,9 @@ mod tests {
#[test]
fn test_repeated_leader_schedule() {
let num_keys = 10;
let stakes: Vec<_> = (0..num_keys).map(|i| (solana_sdk::pubkey::new_rand(), i)).collect();
let stakes: Vec<_> = (0..num_keys)
.map(|i| (solana_sdk::pubkey::new_rand(), i))
.collect();
let seed = solana_sdk::pubkey::new_rand();
let mut seed_bytes = [0u8; 32];