Skip to content

test_valid_reencoded_transaction()

Documentation for tests/frontier/validation/test_transaction_rlp.py::test_valid_reencoded_transaction@49633827.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/frontier/validation/test_transaction_rlp.py::test_valid_reencoded_transaction --fork Amsterdam

Verify the local field encoder reproduces the framework encoding byte for byte, anchoring the malformation tests to a valid baseline.

Source code in tests/frontier/validation/test_transaction_rlp.py
134
135
136
137
138
139
140
141
142
143
144
145
146
def test_valid_reencoded_transaction(
    transaction_test: TransactionTestFiller,
    pre: Alloc,
    fork: Fork,
) -> None:
    """
    Verify the local field encoder reproduces the framework encoding
    byte for byte, anchoring the malformation tests to a valid baseline.
    """
    tx = signed_tx(pre, fork)
    fields = tx_fields(tx)
    assert encode_tx(fields) == bytes(tx.rlp())
    transaction_test(pre=pre, tx=tx)

Parametrized Test Cases

This test generates 1 parametrized test case across 16 forks.