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

Commit b383cd5

Browse files
authored
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 #7007, but since it might take a while, this one can go in asap and make it to the very next runtime.
1 parent 31d0404 commit b383cd5

File tree

1 file changed

+1
-1
lines changed
  • primitives/npos-elections/compact/src

1 file changed

+1
-1
lines changed

primitives/npos-elections/compact/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ fn struct_def(
157157
)
158158
}).collect::<TokenStream2>();
159159

160-
let edge_count_impl = (1..count).map(|c| {
160+
let edge_count_impl = (1..=count).map(|c| {
161161
let field_name = field_name_for(c);
162162
quote!(
163163
all_edges = all_edges.saturating_add(

0 commit comments

Comments
 (0)