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

Commit

Permalink
gossip-support: set last_session_index earlier (#3978)
Browse files Browse the repository at this point in the history
* gossip-support: set last_session_index earlier

* gossip-support: issue_connection_request never fails

* fmt
  • Loading branch information
ordian authored Sep 30, 2021
1 parent ac28a78 commit 261a124
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions node/network/gossip-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ where
%session_index,
"New session detected",
);
self.last_session_index = Some(session_index);
}

let all_authorities = determine_relevant_authorities(ctx, relay_parent).await?;
Expand All @@ -218,10 +219,9 @@ where
authorities
};

self.issue_connection_request(ctx, other_authorities).await?;
self.issue_connection_request(ctx, other_authorities).await;

if is_new_session {
self.last_session_index = Some(session_index);
update_gossip_topology(ctx, our_index, all_authorities, relay_parent).await?;
}
}
Expand All @@ -234,8 +234,7 @@ where
&mut self,
ctx: &mut Context,
authorities: Vec<AuthorityDiscoveryId>,
) -> Result<(), util::Error>
where
) where
Context: SubsystemContext<Message = GossipSupportMessage>,
Context: overseer::SubsystemContext<Message = GossipSupportMessage>,
{
Expand Down Expand Up @@ -295,8 +294,6 @@ where
self.last_failure = None;
self.failure_start = None;
};

Ok(())
}

fn handle_connect_disconnect(&mut self, ev: NetworkBridgeEvent<GossipSuppportNetworkMessage>) {
Expand Down

0 comments on commit 261a124

Please sign in to comment.