clarify interface of Voting.count_votes

This commit is contained in:
Scott Sadler 2017-03-07 11:24:21 +01:00
parent bbe9d4fc88
commit 9bb2ec276a

View File

@ -68,6 +68,12 @@ class Voting:
* Detect if there are multiple votes from a single node and return them * Detect if there are multiple votes from a single node and return them
in a separate "cheat" dictionary. in a separate "cheat" dictionary.
* Votes must agree on previous block, otherwise they become invalid. * Votes must agree on previous block, otherwise they become invalid.
note:
The sum of votes returned by this function does not neccesarily
equal the length of the list of votes fed in. It may differ for
example if there are found to be multiple votes submitted by a
single voter.
""" """
prev_blocks = collections.Counter() prev_blocks = collections.Counter()
cheat = [] cheat = []