Remove unused pubkey::Pubkey imports
This commit is contained in:
@@ -8,7 +8,7 @@ use solana_ledger::{
|
||||
get_tmp_ledger_path,
|
||||
};
|
||||
use solana_runtime::bank::RewardType;
|
||||
use solana_sdk::{clock::Slot, pubkey::Pubkey};
|
||||
use solana_sdk::{clock::Slot, pubkey};
|
||||
use solana_transaction_status::{Reward, Rewards};
|
||||
use std::path::Path;
|
||||
use test::Bencher;
|
||||
@@ -16,7 +16,7 @@ use test::Bencher;
|
||||
fn create_rewards() -> Rewards {
|
||||
(0..100)
|
||||
.map(|i| Reward {
|
||||
pubkey: solana_sdk::pubkey::new_rand().to_string(),
|
||||
pubkey: pubkey::new_rand().to_string(),
|
||||
lamports: 42 + i,
|
||||
post_balance: std::u64::MAX,
|
||||
reward_type: Some(RewardType::Fee),
|
||||
|
@@ -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();
|
||||
|
@@ -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
|
||||
|
@@ -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];
|
||||
|
Reference in New Issue
Block a user