Skip to content
Open
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
24 changes: 16 additions & 8 deletions crates/apollo_consensus/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,21 @@ impl<ContextT: ConsensusContext> MultiHeightManager<ContextT> {
}
}

fn report_peer(
&self,
broadcast_channels: &mut BroadcastVoteChannel,
metadata: &BroadcastedMessageMetadata,
) {
if broadcast_channels
.broadcast_topic_client
.report_peer(metadata.clone())
.now_or_never()
.is_none()
{
error!("Unable to send report_peer. {:?}", metadata);
}
}

async fn handle_proposal_known_block_info(
&mut self,
context: &mut ContextT,
Expand Down Expand Up @@ -822,14 +837,7 @@ impl<ContextT: ConsensusContext> MultiHeightManager<ContextT> {
}
(Err(e), metadata) => {
// Failed to parse consensus message. Report the peer and drop the vote.
if broadcast_channels
.broadcast_topic_client
.report_peer(metadata.clone())
.now_or_never()
.is_none()
{
error!("Unable to send report_peer. {:?}", metadata)
}
self.report_peer(broadcast_channels, &metadata);
warn!(
"Failed to parse incoming consensus vote, dropping vote. Error: {e}. Vote \
metadata: {metadata:?}"
Expand Down
Loading