diff --git a/bigchaindb/backend/localmongodb/query.py b/bigchaindb/backend/localmongodb/query.py index 4e4557c8..aa80909e 100644 --- a/bigchaindb/backend/localmongodb/query.py +++ b/bigchaindb/backend/localmongodb/query.py @@ -300,7 +300,7 @@ def get_validator_set(conn, height=None): @register_query(LocalMongoDBConnection) -def get_result_by_election_id(conn, election_id, table): +def get_election_result_by_id(conn, election_id, table): query = {'election_id': election_id} cursor = conn.run( diff --git a/bigchaindb/backend/query.py b/bigchaindb/backend/query.py index 86028a05..54ff8900 100644 --- a/bigchaindb/backend/query.py +++ b/bigchaindb/backend/query.py @@ -361,7 +361,7 @@ def get_validator_set(conn, height): @singledispatch -def get_result_by_election_id(conn, election_id, table): +def get_election_result_by_id(conn, election_id, table): """Return a validator set change with the specified election_id """ diff --git a/bigchaindb/common/election.py b/bigchaindb/common/election.py index e114a6c6..7c07fe8b 100644 --- a/bigchaindb/common/election.py +++ b/bigchaindb/common/election.py @@ -221,7 +221,7 @@ class Election(Transaction): return self.ONGOING def get_election_result(self, election_id, bigchain): - result = bigchain.get_result_by_election_id(election_id, self.DB_TABLE) + result = bigchain.get_election_result_by_id(election_id, self.DB_TABLE) return result @classmethod diff --git a/bigchaindb/lib.py b/bigchaindb/lib.py index 5cc5ff0f..bee2f123 100644 --- a/bigchaindb/lib.py +++ b/bigchaindb/lib.py @@ -430,7 +430,7 @@ class BigchainDB(object): return validators def get_result_by_election_id(self, election_id, table): - result = backend.query.get_result_by_election_id(self.connection, election_id, table) + result = backend.query.get_election_result_by_id(self.connection, election_id, table) return result def store_pre_commit_state(self, state):