Add VoteTracker for tracking cluster's votes in gossip (#8327)
Track votes by slot in cluster_vote_listener
This commit is contained in:
@@ -5,14 +5,16 @@ use crate::{
|
||||
banking_stage::BankingStage,
|
||||
broadcast_stage::{BroadcastStage, BroadcastStageType},
|
||||
cluster_info::ClusterInfo,
|
||||
cluster_info_vote_listener::ClusterInfoVoteListener,
|
||||
cluster_info_vote_listener::{ClusterInfoVoteListener, VoteTracker},
|
||||
fetch_stage::FetchStage,
|
||||
poh_recorder::{PohRecorder, WorkingBankEntry},
|
||||
sigverify::TransactionSigVerifier,
|
||||
sigverify_stage::{DisabledSigVerifier, SigVerifyStage},
|
||||
};
|
||||
use crossbeam_channel::unbounded;
|
||||
use solana_ledger::{blockstore::Blockstore, blockstore_processor::TransactionStatusSender};
|
||||
use solana_ledger::{
|
||||
bank_forks::BankForks, blockstore::Blockstore, blockstore_processor::TransactionStatusSender,
|
||||
};
|
||||
use std::{
|
||||
net::UdpSocket,
|
||||
sync::{
|
||||
@@ -46,6 +48,8 @@ impl Tpu {
|
||||
broadcast_type: &BroadcastStageType,
|
||||
exit: &Arc<AtomicBool>,
|
||||
shred_version: u16,
|
||||
vote_tracker: Arc<VoteTracker>,
|
||||
bank_forks: Arc<RwLock<BankForks>>,
|
||||
) -> Self {
|
||||
let (packet_sender, packet_receiver) = channel();
|
||||
let fetch_stage = FetchStage::new_with_sender(
|
||||
@@ -72,6 +76,8 @@ impl Tpu {
|
||||
sigverify_disabled,
|
||||
verified_vote_sender,
|
||||
&poh_recorder,
|
||||
vote_tracker,
|
||||
bank_forks,
|
||||
);
|
||||
|
||||
let banking_stage = BankingStage::new(
|
||||
|
Reference in New Issue
Block a user