Skip to content

Commit

Permalink
Merge branch 'tpu-vote' of github.com:sakridge/solana into tpu-vote
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-stones committed Sep 24, 2021
2 parents 69334e2 + ce7f774 commit e80264d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,17 @@ impl BankingStage {
assert!(num_threads >= NUM_VOTE_PROCESSING_THREADS + MIN_THREADS_BANKING);
let bank_thread_hdls: Vec<JoinHandle<()>> = (0..num_threads)
.map(|i| {
let (verified_receiver, forward_option) = match i.cmp(&(num_threads - 2)) {
std::cmp::Ordering::Less => {
(verified_receiver.clone(), ForwardOption::ForwardTransaction)
}
std::cmp::Ordering::Equal => (
tpu_verified_vote_receiver.clone(),
ForwardOption::ForwardTpuVote,
),
std::cmp::Ordering::Greater => {
let (verified_receiver, forward_option) = match i {
0 => {
// Disable forwarding of vote transactions
// from gossip. Note - votes can also arrive from tpu
(verified_vote_receiver.clone(), ForwardOption::NotForward)
}
1 => (
tpu_verified_vote_receiver.clone(),
ForwardOption::ForwardTpuVote,
),
_ => (verified_receiver.clone(), ForwardOption::ForwardTransaction),
};

let poh_recorder = poh_recorder.clone();
Expand Down

0 comments on commit e80264d

Please sign in to comment.