Skip to content

Commit

Permalink
review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kubanemil committed Jul 31, 2024
1 parent a74a05f commit 3a52d4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/verified_vote_packets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ impl VerifiedVotePackets {
vote_packets_receiver: &VerifiedLabelVotePacketsReceiver,
would_be_leader: bool,
) -> Result<()> {
if !would_be_leader {
return Ok(());
}

use SingleValidatorVotes::*;
const RECV_TIMEOUT: Duration = Duration::from_millis(200);
let vote_packets = vote_packets_receiver.recv_timeout(RECV_TIMEOUT)?;
let vote_packets = std::iter::once(vote_packets).chain(vote_packets_receiver.try_iter());

if !would_be_leader {
return Ok(());
}

for gossip_votes in vote_packets {
for verfied_vote_metadata in gossip_votes {
let VerifiedVoteMetadata {
Expand Down

0 comments on commit 3a52d4a

Please sign in to comment.