When calculating a quorum there was a case where two heads that were equal would result in double-counting, allowing the quorum to pass a threshold higher than the expected votes.
To prevent this, each head is immediately counted as a direct vote. Then, when comparing the head to the rest of the set, if they are equal that iteration would be skipped. This is because the merge base of two equal commits is that commit, resulting in the double-counting.
Note that the skip can also skip the current head, so i + 1 is used.
When calculating a quorum there was a case where two heads that were equal would result in double-counting, allowing the quorum to pass a threshold higher than the expected votes.
To prevent this, each head is immediately counted as a direct vote. Then, when comparing the head to the rest of the set, if they are equal that iteration would be skipped. This is because the merge base of two equal commits is that commit, resulting in the double-counting.
Note that the skip can also skip the current head, so i + 1 is used.
Rebase, add a few tests.