Strip unused return type
This commit is contained in:
parent
56734dca3b
commit
5200435bab
19
src/tpu.rs
19
src/tpu.rs
|
@ -2,7 +2,7 @@
|
|||
//! multi-stage transaction processing pipeline in software.
|
||||
|
||||
use crate::bank::Bank;
|
||||
use crate::banking_stage::{BankingStage, BankingStageReturnType};
|
||||
use crate::banking_stage::BankingStage;
|
||||
use crate::broadcast_service::BroadcastService;
|
||||
use crate::cluster_info::ClusterInfo;
|
||||
use crate::cluster_info_vote_listener::ClusterInfoVoteListener;
|
||||
|
@ -217,34 +217,29 @@ impl Tpu {
|
|||
self.exit.load(Ordering::Relaxed)
|
||||
}
|
||||
|
||||
pub fn close(self) -> thread::Result<Option<TpuReturnType>> {
|
||||
pub fn close(self) -> thread::Result<()> {
|
||||
self.tpu_mode_close();
|
||||
self.join()
|
||||
}
|
||||
}
|
||||
|
||||
impl Service for Tpu {
|
||||
type JoinReturnType = Option<TpuReturnType>;
|
||||
type JoinReturnType = ();
|
||||
|
||||
fn join(self) -> thread::Result<(Option<TpuReturnType>)> {
|
||||
fn join(self) -> thread::Result<()> {
|
||||
match self.tpu_mode {
|
||||
Some(TpuMode::Leader(svcs)) => {
|
||||
svcs.broadcast_service.join()?;
|
||||
svcs.fetch_stage.join()?;
|
||||
svcs.sigverify_stage.join()?;
|
||||
svcs.cluster_info_vote_listener.join()?;
|
||||
match svcs.banking_stage.join()? {
|
||||
Some(BankingStageReturnType::LeaderRotation(tick_height)) => {
|
||||
Ok(Some(TpuReturnType::LeaderRotation(tick_height)))
|
||||
}
|
||||
_ => Ok(None),
|
||||
}
|
||||
svcs.banking_stage.join()?;
|
||||
}
|
||||
Some(TpuMode::Forwarder(svcs)) => {
|
||||
svcs.tpu_forwarder.join()?;
|
||||
Ok(None)
|
||||
}
|
||||
None => Ok(None),
|
||||
None => (),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
11
src/tvu.rs
11
src/tvu.rs
|
@ -174,22 +174,21 @@ impl Tvu {
|
|||
self.replay_stage.exit();
|
||||
}
|
||||
|
||||
pub fn close(self) -> thread::Result<Option<TvuReturnType>> {
|
||||
pub fn close(self) -> thread::Result<()> {
|
||||
self.exit();
|
||||
self.join()
|
||||
}
|
||||
}
|
||||
|
||||
impl Service for Tvu {
|
||||
type JoinReturnType = Option<TvuReturnType>;
|
||||
type JoinReturnType = ();
|
||||
|
||||
fn join(self) -> thread::Result<Option<TvuReturnType>> {
|
||||
fn join(self) -> thread::Result<()> {
|
||||
self.retransmit_stage.join()?;
|
||||
self.fetch_stage.join()?;
|
||||
self.storage_stage.join()?;
|
||||
match self.replay_stage.join()? {
|
||||
_ => Ok(None),
|
||||
}
|
||||
self.replay_stage.join()?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue