Commit f8ed46f4 authored by Lldenaurois's avatar Lldenaurois Committed by GitHub
Browse files

Extract and test count_no_shows method for approval voting (#3264)

* node/approval-voting: extract and test count_no_shows method

This commit extracts no_show computation into a pure function so that it can be
extensively unit tested.

* node/approval-voting: ignore invalid validator indexes in count_no_show

Previously indexes that were past the length of the approvals bitvector
would contribute to the no_show count or the next_no_show value. This
commit changes the behavior to ignore garbage values.

* node/approval-voting: add comment for next_no_show adding clock_drift
parent 325cc888
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