예제 #1
0
def test_invalid_rev_block_3():
    utxo_set = UTXOSet()
    rev_block = RevBlock("", [], [])
    rev_block.pow = "00" * 32
    rev_block.removable = [OutPoint("aa" * 32, 0).hex]
    with pytest.raises(Exception):
        utxo_set.reverse_block(rev_block)
예제 #2
0
def test_invalid_rev_block_2():
    utxo_set = UTXOSet()
    rev_block = RevBlock("", [], [])
    rev_block.pow = "00" * 32
    rev_block.old_txout = [[OutPoint("00" * 32, 0).hex, TxOut()]]
    with pytest.raises(Exception):
        utxo_set.reverse_block(rev_block)
예제 #3
0
def test_rev_block_invalid_3():
    rev_block = RevBlock("", [], [])
    rev_block.pow = "00" * 32
    rev_block.old_txout = [[OutPoint("00" * 32, 0).hex, TxOut()]]
    assert not rev_block.is_valid()