mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
extra test for tx_collector and docs fix
This commit is contained in:
@@ -262,7 +262,7 @@ class Block(object):
|
||||
DoubleSpend: if the transaction is a double spend
|
||||
InvalidHash: if the hash of the transaction is wrong
|
||||
InvalidSignature: if the signature of the transaction is wrong
|
||||
ValidationError: If the block contains a duplicated TX
|
||||
DuplicateTransaction: If the block contains a duplicated TX
|
||||
"""
|
||||
txids = [tx.id for tx in self.transactions]
|
||||
if len(txids) != len(set(txids)):
|
||||
|
||||
@@ -231,7 +231,7 @@ def test_full_pipeline(b, user_pk):
|
||||
def test_block_snowflake(create_tx, signed_transfer_tx):
|
||||
from bigchaindb.pipelines.block import tx_collector
|
||||
snowflake = tx_collector()
|
||||
snowflake.send(create_tx)
|
||||
assert snowflake.send(create_tx) == [create_tx]
|
||||
snowflake.send(signed_transfer_tx)
|
||||
snowflake.send(create_tx)
|
||||
assert snowflake.send(None) == [create_tx, signed_transfer_tx]
|
||||
|
||||
Reference in New Issue
Block a user