remove rethinkdb call from election.py (#853)

This commit is contained in:
Ryan Henderson 2016-11-23 10:16:57 +01:00 committed by GitHub
parent 848f771655
commit e2c9e4e746

View File

@ -6,7 +6,6 @@ is specified in ``create_pipeline``.
"""
import logging
import rethinkdb as r
from multipipes import Pipeline, Node
from bigchaindb.pipelines.utils import ChangeFeed
@ -31,9 +30,8 @@ class Election:
next_vote: The next vote.
"""
next_block = self.bigchain.connection.run(
r.table('bigchain')
.get(next_vote['vote']['voting_for_block']))
next_block = self.bigchain.get_block(
next_vote['vote']['voting_for_block'])
block_status = self.bigchain.block_election_status(next_block['id'],
next_block['block']['voters'])