Remove redundant ReplayStageConfig::my_pubkey field

This commit is contained in:
Michael Vines 2021-06-21 12:29:19 -07:00
parent 553fc210f5
commit 2435ea3ad8
2 changed files with 3 additions and 9 deletions

View File

@ -114,7 +114,6 @@ struct SkippedSlotsInfo {
} }
pub struct ReplayStageConfig { pub struct ReplayStageConfig {
pub my_pubkey: Pubkey,
pub vote_account: Pubkey, pub vote_account: Pubkey,
pub authorized_voter_keypairs: Arc<RwLock<Vec<Arc<Keypair>>>>, pub authorized_voter_keypairs: Arc<RwLock<Vec<Arc<Keypair>>>>,
pub exit: Arc<AtomicBool>, pub exit: Arc<AtomicBool>,
@ -298,7 +297,6 @@ impl ReplayStage {
cost_model: Arc<RwLock<CostModel>>, cost_model: Arc<RwLock<CostModel>>,
) -> Self { ) -> Self {
let ReplayStageConfig { let ReplayStageConfig {
my_pubkey,
vote_account, vote_account,
authorized_voter_keypairs, authorized_voter_keypairs,
exit, exit,
@ -328,6 +326,7 @@ impl ReplayStage {
.spawn(move || { .spawn(move || {
let verify_recyclers = VerifyRecyclers::default(); let verify_recyclers = VerifyRecyclers::default();
let _exit = Finalizer::new(exit.clone()); let _exit = Finalizer::new(exit.clone());
let my_pubkey = cluster_info.id();
let ( let (
mut progress, mut progress,
mut heaviest_subtree_fork_choice, mut heaviest_subtree_fork_choice,

View File

@ -42,10 +42,7 @@ use solana_runtime::{
commitment::BlockCommitmentCache, commitment::BlockCommitmentCache,
vote_sender_types::ReplayVoteSender, vote_sender_types::ReplayVoteSender,
}; };
use solana_sdk::{ use solana_sdk::{pubkey::Pubkey, signature::Keypair};
pubkey::Pubkey,
signature::{Keypair, Signer},
};
use std::{ use std::{
boxed::Box, boxed::Box,
collections::HashSet, collections::HashSet,
@ -131,8 +128,6 @@ impl Tvu {
max_slots: &Arc<MaxSlots>, max_slots: &Arc<MaxSlots>,
cost_model: &Arc<RwLock<CostModel>>, cost_model: &Arc<RwLock<CostModel>>,
) -> Self { ) -> Self {
let keypair: Arc<Keypair> = cluster_info.keypair.clone();
let Sockets { let Sockets {
repair: repair_socket, repair: repair_socket,
fetch: fetch_sockets, fetch: fetch_sockets,
@ -259,7 +254,6 @@ impl Tvu {
}; };
let replay_stage_config = ReplayStageConfig { let replay_stage_config = ReplayStageConfig {
my_pubkey: keypair.pubkey(),
vote_account: *vote_account, vote_account: *vote_account,
authorized_voter_keypairs, authorized_voter_keypairs,
exit: exit.clone(), exit: exit.clone(),
@ -353,6 +347,7 @@ pub mod tests {
use solana_poh::poh_recorder::create_test_recorder; use solana_poh::poh_recorder::create_test_recorder;
use solana_rpc::optimistically_confirmed_bank_tracker::OptimisticallyConfirmedBank; use solana_rpc::optimistically_confirmed_bank_tracker::OptimisticallyConfirmedBank;
use solana_runtime::bank::Bank; use solana_runtime::bank::Bank;
use solana_sdk::signature::Signer;
use std::sync::atomic::Ordering; use std::sync::atomic::Ordering;
#[ignore] #[ignore]