Remove dead code
This commit is contained in:
parent
511085b747
commit
c94bc2a0b6
|
@ -190,7 +190,7 @@ impl ReplayStage {
|
|||
cluster_info: Arc<RwLock<ClusterInfo>>,
|
||||
exit: Arc<AtomicBool>,
|
||||
mut current_blob_index: u64,
|
||||
last_entry_id: Arc<RwLock<Hash>>,
|
||||
last_entry_id: Hash,
|
||||
to_leader_sender: &TvuRotationSender,
|
||||
ledger_signal_receiver: Receiver<bool>,
|
||||
leader_scheduler: &Arc<RwLock<LeaderScheduler>>,
|
||||
|
@ -200,6 +200,7 @@ impl ReplayStage {
|
|||
let exit_ = exit.clone();
|
||||
let leader_scheduler_ = leader_scheduler.clone();
|
||||
let to_leader_sender = to_leader_sender.clone();
|
||||
let last_entry_id = Arc::new(RwLock::new(last_entry_id));
|
||||
let subscriptions_ = subscriptions.clone();
|
||||
let t_replay = Builder::new()
|
||||
.name("solana-replay-stage".to_string())
|
||||
|
@ -465,7 +466,7 @@ mod test {
|
|||
Arc::new(RwLock::new(cluster_info_me)),
|
||||
exit.clone(),
|
||||
meta.consumed,
|
||||
Arc::new(RwLock::new(last_entry_id)),
|
||||
last_entry_id,
|
||||
&rotation_sender,
|
||||
l_receiver,
|
||||
&leader_scheduler,
|
||||
|
@ -569,7 +570,7 @@ mod test {
|
|||
cluster_info_me.clone(),
|
||||
exit.clone(),
|
||||
entry_height,
|
||||
Arc::new(RwLock::new(last_entry_id)),
|
||||
last_entry_id,
|
||||
&to_leader_sender,
|
||||
l_receiver,
|
||||
&leader_scheduler,
|
||||
|
@ -695,7 +696,7 @@ mod test {
|
|||
cluster_info_me.clone(),
|
||||
exit.clone(),
|
||||
meta.consumed,
|
||||
Arc::new(RwLock::new(last_entry_id)),
|
||||
last_entry_id,
|
||||
&rotation_tx,
|
||||
l_receiver,
|
||||
&leader_scheduler,
|
||||
|
|
10
src/tvu.rs
10
src/tvu.rs
|
@ -48,7 +48,6 @@ pub struct Tvu {
|
|||
entry_stream_stage: Option<EntryStreamStage>,
|
||||
storage_stage: StorageStage,
|
||||
exit: Arc<AtomicBool>,
|
||||
last_entry_id: Arc<RwLock<Hash>>,
|
||||
}
|
||||
|
||||
pub struct Sockets {
|
||||
|
@ -122,8 +121,6 @@ impl Tvu {
|
|||
exit.clone(),
|
||||
);
|
||||
|
||||
let l_last_entry_id = Arc::new(RwLock::new(last_entry_id));
|
||||
|
||||
let (replay_stage, mut previous_receiver) = ReplayStage::new(
|
||||
keypair.pubkey(),
|
||||
voting_keypair,
|
||||
|
@ -132,7 +129,7 @@ impl Tvu {
|
|||
cluster_info.clone(),
|
||||
exit.clone(),
|
||||
blob_index,
|
||||
l_last_entry_id.clone(),
|
||||
last_entry_id,
|
||||
to_leader_sender,
|
||||
ledger_signal_receiver,
|
||||
&leader_scheduler,
|
||||
|
@ -171,14 +168,9 @@ impl Tvu {
|
|||
entry_stream_stage,
|
||||
storage_stage,
|
||||
exit,
|
||||
last_entry_id: l_last_entry_id,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_state(&self) -> Hash {
|
||||
*self.last_entry_id.read().unwrap()
|
||||
}
|
||||
|
||||
pub fn is_exited(&self) -> bool {
|
||||
self.exit.load(Ordering::Relaxed)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue