mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 14:41:11 +00:00
Actually connect to new validators at session boundary. (#3055)
* Actually connect to new validators at session boundary. * Add tracing.
This commit is contained in:
@@ -102,6 +102,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)
|
||||
}
|
||||
|
||||
@@ -152,7 +157,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)),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user