Skip to content
Snippets Groups Projects
Commit e6ce3e7a authored by Kian Paimani's avatar Kian Paimani Committed by GitHub
Browse files

Fix compact npos solution edge count calculation (#7021)

This edge count is used for weighing, and it is somewhat trivial to review and verify that the current implementation was ignoring `votes16` field of the struct. As reminder, the struct is like this: 
```rust

struct Compact {
  votes1: ... ,
  votes2: ..., 
  ...,
  votes16: ...,
}
```

I already will fix this in https://github.com/paritytech/substrate/pull/7007, but since it might take a while, this one can go in asap and make it to the very next runtime.
parent 23b254e4
Branches
No related merge requests found
......@@ -157,7 +157,7 @@ fn struct_def(
)
}).collect::<TokenStream2>();
let edge_count_impl = (1..count).map(|c| {
let edge_count_impl = (1..=count).map(|c| {
let field_name = field_name_for(c);
quote!(
all_edges = all_edges.saturating_add(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment