mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
fixed test_core.py by converting dict transaction to Transaction Object
This commit is contained in:
parent
9e471bf576
commit
5356cb8ac2
@ -319,10 +319,8 @@ class Planetmint(object):
|
||||
if len(transactions) + len(current_spent_transactions) > 1:
|
||||
raise DoubleSpend('tx "{}" spends inputs twice'.format(txid))
|
||||
elif transactions:
|
||||
# print( f"\n\nget tx from DB : {transactions[0]['id']} {transactions[0]}")
|
||||
transaction = backend.query.get_transactions(self.connection, [transactions[0]['id']])
|
||||
# print( f"\n\nget tx from DB result: {transaction}")
|
||||
# transaction = Transaction.from_db(self, transactions[0])
|
||||
transaction = Transaction.from_dict(transaction[0])
|
||||
elif current_spent_transactions:
|
||||
transaction = current_spent_transactions[0]
|
||||
|
||||
|
||||
@ -118,7 +118,6 @@ def test_get_spent_issue_1271(b, alice, bob, carol):
|
||||
assert tx_5.validate(b)
|
||||
|
||||
b.store_bulk_transactions([tx_5])
|
||||
|
||||
assert b.get_spent(tx_2.id, 0) == tx_5
|
||||
assert not b.get_spent(tx_5.id, 0)
|
||||
assert b.get_outputs_filtered(alice.public_key)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user