mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 07:35:41 +00:00
Cache SessionInfo on new activated leaf in dispute-distribution (#6993)
* Cache `SessionInfo` on new activated leaf in `dispute-distribution` * Update node/network/dispute-distribution/src/sender/mod.rs Co-authored-by: Bastian Köcher <git@kchr.de> * fmt * Decrease log level --------- Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
committed by
GitHub
parent
88a0b303d5
commit
3ab60efc26
@@ -366,6 +366,12 @@ async fn get_active_session_indices<Context>(
|
||||
// Iterate all heads we track as active and fetch the child' session indices.
|
||||
for head in active_heads {
|
||||
let session_index = runtime.get_session_index_for_child(ctx.sender(), *head).await?;
|
||||
// Cache session info
|
||||
if let Err(err) =
|
||||
runtime.get_session_info_by_index(ctx.sender(), *head, session_index).await
|
||||
{
|
||||
gum::debug!(target: LOG_TARGET, ?err, ?session_index, "Can't cache SessionInfo");
|
||||
}
|
||||
indeces.insert(session_index, *head);
|
||||
}
|
||||
Ok(indeces)
|
||||
|
||||
Reference in New Issue
Block a user