Exemplo n.º 1
0
def testIsValidChainBadGenesis(Blockchain3Blocks):
    Blockchain3Blocks.chain[0].hash = 'evil_hash'

    with pytest.raises(Exception, match='The genesis block must be valid'):
        Blockchain.isValidChain(Blockchain3Blocks.chain)
Exemplo n.º 2
0
def testIsValidChain(Blockchain3Blocks):
    Blockchain.isValidChain(Blockchain3Blocks.chain)