Documentation for tests/frontier/examples/test_block_intermediate_state.py::test_block_intermediate_state@ffe48572.
Generate fixtures for these test cases for Bogota with:
fill -v tests/frontier/examples/test_block_intermediate_state.py::test_block_intermediate_state --fork Bogota
Verify intermediate block states.
Source code in tests/frontier/examples/test_block_intermediate_state.py
| @pytest.mark.valid_from("Frontier")
def test_block_intermediate_state(
blockchain_test: BlockchainTestFiller, pre: Alloc
) -> None:
"""Verify intermediate block states."""
sender = pre.fund_eoa()
tx = Transaction(to=None, data=b"", sender=sender, protected=False)
tx_2 = Transaction(to=None, data=b"", sender=sender, protected=False)
block_1 = Block(
txs=[tx],
expected_post_state={
sender: Account(
nonce=1,
),
},
)
block_2 = Block(txs=[])
block_3 = Block(
txs=[tx_2],
expected_post_state={
sender: Account(
nonce=2,
),
},
)
blockchain_test(
pre=pre,
post=block_3.expected_post_state,
blocks=[block_1, block_2, block_3],
)
|
Parametrized Test Cases
This test generates 1 parametrized test case across 17 forks.