Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,7 @@ impl Validator {
genesis_config.hash(),
ledger_path,
config.validator_exit.clone(),
exit.clone(),
config.known_validators.clone(),
rpc_override_health_check.clone(),
startup_verification_complete,
Expand Down
7 changes: 4 additions & 3 deletions rpc/src/rpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ impl JsonRpcService {
genesis_hash: Hash,
ledger_path: &Path,
validator_exit: Arc<RwLock<Exit>>,
exit: Arc<AtomicBool>,
known_validators: Option<HashSet<Pubkey>>,
override_health_check: Arc<AtomicBool>,
startup_verification_complete: Arc<AtomicBool>,
Expand Down Expand Up @@ -476,7 +477,6 @@ impl JsonRpcService {
prioritization_fee_cache,
);

let exit = Arc::new(AtomicBool::new(false));
let leader_info =
poh_recorder.map(|recorder| ClusterTpuInfo::new(cluster_info.clone(), recorder));
let _send_transaction_service = Arc::new(SendTransactionService::new_with_config(
Expand Down Expand Up @@ -560,7 +560,6 @@ impl JsonRpcService {
.unwrap()
.register_exit(Box::new(move || {
close_handle_.close();
exit.store(true, Ordering::Relaxed);
}));
Ok(Self {
thread_hdl,
Expand All @@ -576,7 +575,8 @@ impl JsonRpcService {
}
}

pub fn join(self) -> thread::Result<()> {
pub fn join(mut self) -> thread::Result<()> {
self.exit();
self.thread_hdl.join()
}
}
Expand Down Expand Up @@ -642,6 +642,7 @@ mod tests {
Hash::default(),
&PathBuf::from("farf"),
validator_exit,
exit,
None,
Arc::new(AtomicBool::new(false)),
Arc::new(AtomicBool::new(true)),
Expand Down