Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fixup unify_with_peer
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
  • Loading branch information
alexggh committed Aug 23, 2023
1 parent 71c08a4 commit 0349441
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions node/network/approval-distribution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1934,11 +1934,13 @@ impl State {

if should_forward_approval {
if !approvals_to_send.contains_key(&(
approval_message.block_hash,
approval_message.validator,
approval_message.candidate_indices.clone(),
)) {
approvals_to_send.insert(
(
approval_message.block_hash,
approval_message.validator,
approval_message.candidate_indices.clone(),
),
Expand Down Expand Up @@ -2269,11 +2271,13 @@ async fn adjust_required_routing_and_propagate<Context, BlockFilter, RoutingModi
let approvals_to_send =
peer_approvals.entry(*peer).or_insert_with(HashMap::new);
if !approvals_to_send.contains_key(&(
approval_message.block_hash,
approval_message.validator,
approval_message.candidate_indices.clone(),
)) {
peer_approvals.entry(*peer).or_insert_with(HashMap::new).insert(
(
approval_message.block_hash,
approval_message.validator,
approval_message.candidate_indices.clone(),
),
Expand Down

0 comments on commit 0349441

Please sign in to comment.