mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: No test to validate duplicate inputs (#2425)
Solution: Update tests
This commit is contained in:
parent
f13c9a9d57
commit
533030cdae
@ -382,8 +382,16 @@ def test_get_spent_transaction_critical_double_spend(b, alice, bob, carol):
|
||||
asset_id=tx.id)\
|
||||
.sign([alice.private_key])
|
||||
|
||||
same_input_double_spend = Transaction.transfer(tx.to_inputs() + tx.to_inputs(),
|
||||
[([bob.public_key], 1)],
|
||||
asset_id=tx.id)\
|
||||
.sign([alice.private_key])
|
||||
|
||||
b.store_bulk_transactions([tx])
|
||||
|
||||
with pytest.raises(DoubleSpend):
|
||||
same_input_double_spend.validate(b)
|
||||
|
||||
assert b.get_spent(tx.id, tx_transfer.inputs[0].fulfills.output, [tx_transfer])
|
||||
|
||||
with pytest.raises(DoubleSpend):
|
||||
|
Loading…
x
Reference in New Issue
Block a user