mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: 'backlog' still referenced by some code & comments
Solution: Remove all references to 'backlog'. Also make the tuple of TABLES common to all backend databases.
This commit is contained in:
parent
01dba7e883
commit
2a6eebd086
@ -31,8 +31,7 @@ def create_database(conn, dbname):
|
|||||||
|
|
||||||
@register_schema(LocalMongoDBConnection)
|
@register_schema(LocalMongoDBConnection)
|
||||||
def create_tables(conn, dbname):
|
def create_tables(conn, dbname):
|
||||||
for table_name in ['transactions', 'utxos', 'assets', 'blocks', 'metadata',
|
for table_name in backend.schema.TABLES:
|
||||||
'validators', 'pre_commit']:
|
|
||||||
logger.info('Create `%s` table.', table_name)
|
logger.info('Create `%s` table.', table_name)
|
||||||
# create the table
|
# create the table
|
||||||
# TODO: read and write concerns can be declared here
|
# TODO: read and write concerns can be declared here
|
||||||
|
|||||||
@ -14,7 +14,7 @@ PRE_COMMIT_ID = 'a_unique_id_string'
|
|||||||
|
|
||||||
@singledispatch
|
@singledispatch
|
||||||
def store_transaction(connection, signed_transaction):
|
def store_transaction(connection, signed_transaction):
|
||||||
"""Write a transaction to the backlog table.
|
"""Write a signed transaction to the 'transactions' table.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
signed_transaction (dict): a signed transaction.
|
signed_transaction (dict): a signed transaction.
|
||||||
|
|||||||
@ -2,16 +2,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
# Code is Apache-2.0 and docs are CC-BY-4.0
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
"""Database creation and schema-providing interfaces for backends.
|
"""Database creation and schema-providing interfaces for backends."""
|
||||||
|
|
||||||
Attributes:
|
|
||||||
TABLES (tuple): The three standard tables BigchainDB relies on:
|
|
||||||
|
|
||||||
* ``backlog`` for incoming transactions awaiting to be put into
|
|
||||||
a block.
|
|
||||||
* ``bigchain`` for blocks.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
from functools import singledispatch
|
from functools import singledispatch
|
||||||
import logging
|
import logging
|
||||||
@ -23,7 +14,10 @@ from bigchaindb.common.utils import validate_all_values_for_key
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
TABLES = ('bigchain', 'backlog', 'assets', 'metadata')
|
# Tables/collections that every backend database must create
|
||||||
|
TABLES = ('transactions', 'blocks', 'assets', 'metadata',
|
||||||
|
'validators', 'pre_commit', 'utxos')
|
||||||
|
|
||||||
VALID_LANGUAGES = ('danish', 'dutch', 'english', 'finnish', 'french', 'german',
|
VALID_LANGUAGES = ('danish', 'dutch', 'english', 'finnish', 'french', 'german',
|
||||||
'hungarian', 'italian', 'norwegian', 'portuguese', 'romanian',
|
'hungarian', 'italian', 'norwegian', 'portuguese', 'romanian',
|
||||||
'russian', 'spanish', 'swedish', 'turkish', 'none',
|
'russian', 'spanish', 'swedish', 'turkish', 'none',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user