extra test for tx_collector and docs fix

This commit is contained in:
Scott Sadler
2017-03-02 18:48:03 +01:00
parent 1d935b9ae6
commit a71dc66e97
2 changed files with 2 additions and 2 deletions

View File

@@ -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)):

View File

@@ -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]