'Collect the validity of transactions and cast a vote when ready.
Args:
tx_validity (bool): the validity of the transaction
block_id (str): the id of block containing the transaction
num_tx (int): the total number of transactions to process
Returns:
None, or a vote if a decision has been reached.'

def vote(self, tx_validity, block_id, num_tx):

    self.counters[block_id] += 1
    self.blocks_validity_status[block_id] = (tx_validity and self.blocks_validity_status.get(block_id, True))
    if (self.counters[block_id] == num_tx):
        vote = self.bigchain.vote(block_id, self.last_voted_id, self.blocks_validity_status[block_id])
        self.last_voted_id = block_id
        del self.counters[block_id]
        del self.blocks_validity_status[block_id]
        return (vote, num_tx)
