Skip to content

Commit

Permalink
fix session stats by skipping subset
Browse files Browse the repository at this point in the history
  • Loading branch information
paulormart committed Aug 1, 2024
1 parent c23228e commit 3b316a3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/runtimes/kusama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3447,6 +3447,11 @@ pub async fn cache_session_stats_records(
.try_into()
.unwrap();

// check to skip subset stats if no validators
if ss.vals_total == 0 {
continue;
}

// active validators
ss.vals_active = validators
.iter()
Expand Down
5 changes: 5 additions & 0 deletions src/runtimes/paseo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3441,6 +3441,11 @@ pub async fn cache_session_stats_records(
.try_into()
.unwrap();

// check to skip subset stats if no validators
if ss.vals_total == 0 {
continue;
}

// active validators
ss.vals_active = validators
.iter()
Expand Down
5 changes: 5 additions & 0 deletions src/runtimes/polkadot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3447,6 +3447,11 @@ pub async fn cache_session_stats_records(
.try_into()
.unwrap();

// check to skip subset stats if no validators
if ss.vals_total == 0 {
continue;
}

// active validators
ss.vals_active = validators
.iter()
Expand Down

0 comments on commit 3b316a3

Please sign in to comment.