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

Commit

Permalink
Actually connect to new validators at session boundary. (#3055)
Browse files Browse the repository at this point in the history
* Actually connect to new validators at session boundary.

* Add tracing.
  • Loading branch information
eskimor authored and andresilva committed May 19, 2021
1 parent 8f6d34a commit 93c76bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion node/network/gossip-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ async fn determine_relevant_authorities(
relay_parent: Hash,
) -> Result<Vec<AuthorityDiscoveryId>, util::Error> {
let authorities = util::request_authorities(relay_parent, ctx.sender()).await.await??;
tracing::debug!(
target: LOG_TARGET,
authority_count = ?authorities.len(),
"Determined relevant authorities"
);
Ok(authorities)
}

Expand Down Expand Up @@ -137,7 +142,7 @@ impl State {
for leaf in leaves {
let current_index = util::request_session_index_for_child(leaf, ctx.sender()).await.await??;
let maybe_new_session = match self.last_session_index {
Some(i) if i <= current_index => None,
Some(i) if i >= current_index => None,
_ => Some((current_index, leaf)),
};

Expand Down

0 comments on commit 93c76bb

Please sign in to comment.