* Extricate RpcCompletedSlotsService from RetransmitStage
(cherry picked from commit fa04531c7a)
# Conflicts:
# core/src/replay_stage.rs
# core/src/retransmit_stage.rs
# core/src/tvu.rs
# core/src/validator.rs
* removes backport merge conflicts
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
This commit is contained in:
@@ -48,6 +48,7 @@ use {
|
||||
OptimisticallyConfirmedBank, OptimisticallyConfirmedBankTracker,
|
||||
},
|
||||
rpc::JsonRpcConfig,
|
||||
rpc_completed_slots_service::RpcCompletedSlotsService,
|
||||
rpc_pubsub_service::{PubSubConfig, PubSubService},
|
||||
rpc_service::JsonRpcService,
|
||||
rpc_subscriptions::RpcSubscriptions,
|
||||
@@ -84,7 +85,7 @@ use {
|
||||
mpsc::Receiver,
|
||||
Arc, Mutex, RwLock,
|
||||
},
|
||||
thread::{sleep, Builder},
|
||||
thread::{sleep, Builder, JoinHandle},
|
||||
time::{Duration, Instant},
|
||||
},
|
||||
};
|
||||
@@ -248,6 +249,7 @@ pub struct Validator {
|
||||
validator_exit: Arc<RwLock<Exit>>,
|
||||
json_rpc_service: Option<JsonRpcService>,
|
||||
pubsub_service: Option<PubSubService>,
|
||||
rpc_completed_slots_service: JoinHandle<()>,
|
||||
optimistically_confirmed_bank_tracker: Option<OptimisticallyConfirmedBankTracker>,
|
||||
transaction_status_service: Option<TransactionStatusService>,
|
||||
rewards_recorder_service: Option<RewardsRecorderService>,
|
||||
@@ -681,6 +683,10 @@ impl Validator {
|
||||
let (verified_vote_sender, verified_vote_receiver) = unbounded();
|
||||
let (gossip_verified_vote_hash_sender, gossip_verified_vote_hash_receiver) = unbounded();
|
||||
let (cluster_confirmed_slot_sender, cluster_confirmed_slot_receiver) = unbounded();
|
||||
|
||||
let rpc_completed_slots_service =
|
||||
RpcCompletedSlotsService::spawn(completed_slots_receiver, rpc_subscriptions.clone());
|
||||
|
||||
let tvu = Tvu::new(
|
||||
vote_account,
|
||||
authorized_voter_keypairs,
|
||||
@@ -718,7 +724,6 @@ impl Validator {
|
||||
tower,
|
||||
&leader_schedule_cache,
|
||||
&exit,
|
||||
completed_slots_receiver,
|
||||
block_commitment_cache,
|
||||
config.enable_partition.clone(),
|
||||
transaction_status_sender.clone(),
|
||||
@@ -784,6 +789,7 @@ impl Validator {
|
||||
serve_repair_service,
|
||||
json_rpc_service,
|
||||
pubsub_service,
|
||||
rpc_completed_slots_service,
|
||||
optimistically_confirmed_bank_tracker,
|
||||
transaction_status_service,
|
||||
rewards_recorder_service,
|
||||
@@ -847,6 +853,10 @@ impl Validator {
|
||||
pubsub_service.join().expect("pubsub_service");
|
||||
}
|
||||
|
||||
self.rpc_completed_slots_service
|
||||
.join()
|
||||
.expect("rpc_completed_slots_service");
|
||||
|
||||
if let Some(optimistically_confirmed_bank_tracker) =
|
||||
self.optimistically_confirmed_bank_tracker
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user