Update function names to match the generic ones

This commit is contained in:
Sylvain Bellemare 2016-12-13 11:46:56 +01:00
parent bd886553d4
commit a902f895fa
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ def get_votes_by_block_id(conn, block_id):
@register_query(MongoDBConnection) @register_query(MongoDBConnection)
def get_votes_block_id_and_voter(conn, block_id, node_pubkey): def get_votes_by_block_id_and_voter(conn, block_id, node_pubkey):
return conn.db['votes']\ return conn.db['votes']\
.find({'vote.voting_for_block': block_id, .find({'vote.voting_for_block': block_id,
'node_pubkey': node_pubkey}) 'node_pubkey': node_pubkey})

View File

@ -26,7 +26,7 @@ def create_database(conn, dbname):
@register_schema(MongoDBConnection) @register_schema(MongoDBConnection)
def create_table(conn, dbname): def create_tables(conn, dbname):
for table_name in ['bigchain', 'backlog', 'votes']: for table_name in ['bigchain', 'backlog', 'votes']:
logger.info('Create `%s` table.', table_name) logger.info('Create `%s` table.', table_name)
# create the table # create the table
@ -42,7 +42,7 @@ def create_indexes(conn, dbname):
@register_schema(MongoDBConnection) @register_schema(MongoDBConnection)
def drop(conn, dbname): def drop_database(conn, dbname):
conn.drop_database(dbname) conn.drop_database(dbname)