Commit 5c16c95b authored by Lldenaurois's avatar Lldenaurois Committed by GitHub
Browse files

Follow-up PR: Count no-shows (#3309)

* node/approval-voting: test for invalid validator index in assignments

This commit adds a unit test to show that, currently, validator indexes
greater than n_validators (or the length of the approvals bitvector) are
counted in n_assignments. In the subsequent commit we will correct this
behavior.

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

This commit ignores any validator assignments whose index is beyond
n_validators. Without this check, an improperly crafted assignment would
be counted towards the approval.

It still remains that n_assignments and count_no_shows inspect the
number of validators and approvals, respectively. Ideally we would
add greater safety around ensuring these two values cannot differ.
parent ad9c0288
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