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

View File

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