'Write vote to the database.
Args:
vote: the vote to write.'

def write_vote(self, vote, num_tx):

    validity = ('valid' if vote['vote']['is_block_valid'] else 'invalid')
    logger.info("Voting    '%s'    for    block    %s", validity, vote['vote']['voting_for_block'])
    self.bigchain.write_vote(vote)
    self.bigchain.statsd.incr('pipelines.vote.throughput', num_tx)
    return vote
