mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-06-17 18:13:22 +02:00
Removed get_old_transactions
Fixed tests.
This commit is contained in:
parent
976a3e8254
commit
14a2c13a06
|
@ -318,18 +318,3 @@ def get_unvoted_blocks(connection, node_pubkey):
|
|||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@singledispatch
|
||||
def get_old_transactions(connection, node_pubkey):
|
||||
"""Return all the transactions from the backlog that have not been
|
||||
processed by the specified node.
|
||||
|
||||
Args:
|
||||
node_pubkey (str): base58 encoded public key
|
||||
|
||||
Returns:
|
||||
:obj:`list` of :obj:`dict`: a list of unprocessed transactions
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
|
|
@ -244,14 +244,3 @@ def get_unvoted_blocks(connection, node_pubkey):
|
|||
# database level. Solving issue #444 can help untangling the situation
|
||||
unvoted_blocks = filter(lambda block: not util.is_genesis_block(block), unvoted)
|
||||
return unvoted_blocks
|
||||
|
||||
|
||||
@register_query(RethinkDBConnection)
|
||||
def get_old_transactions(connection, node_pubkey):
|
||||
return connection.run(
|
||||
r.table('backlog')
|
||||
.between([node_pubkey, r.minval],
|
||||
[node_pubkey, r.maxval],
|
||||
index='assignee__transaction_timestamp')
|
||||
.order_by(index=r.asc('assignee__transaction_timestamp'))
|
||||
)
|
||||
|
|
|
@ -676,15 +676,3 @@ class Bigchain(object):
|
|||
return Bigchain.BLOCK_INVALID
|
||||
else:
|
||||
return Bigchain.BLOCK_UNDECIDED
|
||||
|
||||
def get_old_transactions(self):
|
||||
"""Return all the transactions from the backlog that have not been
|
||||
processed by the specified node.
|
||||
|
||||
Args:
|
||||
node_pubkey (str): base58 encoded public key
|
||||
|
||||
Returns:
|
||||
:obj:`list` of :obj:`dict`: a list of unprocessed transactions
|
||||
"""
|
||||
return backend.query.get_old_transactions(self.connection, self.me)
|
||||
|
|
|
@ -157,8 +157,7 @@ def create_pipeline():
|
|||
def get_changefeed():
|
||||
connection = backend.connect(**bigchaindb.config['database'])
|
||||
return backend.get_changefeed(connection, 'backlog',
|
||||
ChangeFeed.INSERT | ChangeFeed.UPDATE,
|
||||
prefeed=initial())
|
||||
ChangeFeed.INSERT | ChangeFeed.UPDATE)
|
||||
|
||||
|
||||
def start():
|
||||
|
|
|
@ -37,7 +37,6 @@ def test_schema(schema_func_name, args_qty):
|
|||
('get_votes_by_block_id_and_voter', 2),
|
||||
('update_transaction', 2),
|
||||
('get_transaction_from_block', 2),
|
||||
('get_old_transactions', 1),
|
||||
))
|
||||
def test_query(query_func_name, args_qty):
|
||||
from bigchaindb.backend import query
|
||||
|
|
Loading…
Reference in New Issue
Block a user