'Checks if block has enough invalid votes to make a decision
Args:
next_vote: The next vote.'

def check_for_quorum(self, next_vote):

    try:
        block_id = next_vote['vote']['voting_for_block']
        node = next_vote['node_pubkey']
    except KeyError:
        return
    next_block = self.bigchain.get_block(block_id)
    result = self.bigchain.block_election(next_block)
    self.handle_block_events(result, block_id)
    if (result['status'] == self.bigchain.BLOCK_INVALID):
        return Block.from_dict(next_block)
    if (result['status'] != self.bigchain.BLOCK_UNDECIDED):
        msg = ('node:%s    block:%s    status:%s' % (node, block_id, result['status']))
        logger_results.debug(msg, extra={'current_vote': next_vote, 'election_result': result})
