mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 06:55:45 +00:00
Fixed 4 issues in test/tendermint
Signed-off-by: Sangat Das <sangatdas5@gmail.com>
This commit is contained in:
parent
6e78ca5287
commit
e3626b7be8
@ -334,17 +334,23 @@ def delete_transactions(connection, txn_ids: list):
|
|||||||
@register_query(TarantoolDB)
|
@register_query(TarantoolDB)
|
||||||
def store_unspent_outputs(connection, *unspent_outputs: list):
|
def store_unspent_outputs(connection, *unspent_outputs: list):
|
||||||
space = connection.space('utxos')
|
space = connection.space('utxos')
|
||||||
|
result = []
|
||||||
if unspent_outputs:
|
if unspent_outputs:
|
||||||
for utxo in unspent_outputs:
|
for utxo in unspent_outputs:
|
||||||
space.insert((utxo['transaction_id'], utxo['output_index']))
|
output = space.insert((utxo['transaction_id'], utxo['output_index']))
|
||||||
|
result.append(output.data)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
@register_query(TarantoolDB)
|
@register_query(TarantoolDB)
|
||||||
def delete_unspent_outputs(connection, *unspent_outputs: list):
|
def delete_unspent_outputs(connection, *unspent_outputs: list):
|
||||||
space = connection.space('utxos')
|
space = connection.space('utxos')
|
||||||
|
result = []
|
||||||
if unspent_outputs:
|
if unspent_outputs:
|
||||||
for utxo in unspent_outputs:
|
for utxo in unspent_outputs:
|
||||||
space.delete((utxo['transaction_id'], utxo['output_index']))
|
output = space.delete((utxo['transaction_id'], utxo['output_index']))
|
||||||
|
result.append(output.data)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
@register_query(TarantoolDB)
|
@register_query(TarantoolDB)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user