Example #1
0
def test_is_chain_valid_bad_genesis(blockchain_ten_blocks):
    blockchain_ten_blocks.chain[0].hash = "bad_genesis_block"
    with pytest.raises(Exception, match="The genesis block is not valid"):
        BlockChain.is_chain_valid(blockchain_ten_blocks.chain)
Example #2
0
def test_is_chain_valid(blockchain_ten_blocks):
    BlockChain.is_chain_valid(blockchain_ten_blocks.chain)