Use QUIC client in voting service (#23713)

* Use QUIC client in voting service

* guard quic-client usage with a flag

* add measure to time the quic client

* move time measure outside if block

* remove quic vs UDP flag from voting service
This commit is contained in:
Pankaj Garg 2022-03-21 09:10:16 -07:00 committed by GitHub
parent 965ab9186d
commit 5d03b188c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,7 @@
use {
crate::tower_storage::{SavedTowerVersions, TowerStorage},
crossbeam_channel::Receiver,
solana_client::connection_cache::get_connection,
solana_gossip::cluster_info::ClusterInfo,
solana_measure::measure::Measure,
solana_poh::poh_recorder::PohRecorder,
@ -86,7 +87,12 @@ impl VotingService {
} else {
crate::banking_stage::next_leader_tpu(cluster_info, poh_recorder)
};
let _ = cluster_info.send_transaction(vote_op.tx(), target_address);
let mut measure = Measure::start("vote_tx_send-ms");
let target_address = target_address.unwrap_or_else(|| cluster_info.my_contact_info().tpu);
let _ = get_connection(&target_address).send_transaction(vote_op.tx());
measure.stop();
inc_new_counter_info!("vote_tx_send-ms", measure.as_ms() as usize);
match vote_op {
VoteOp::PushVote {