Add test for execution payload with wrong withdrawals#4856
Conversation
leolara
left a comment
There was a problem hiding this comment.
Thanks!!
The test is good, but I would like the name of the test and the docstring to be more clear (without being excesively long).
I would suggest:
def test_process_execution_payload_missing_expected_withdrawal
"""
Verify payload rejected when it omits a withdrawal expected by the state.
"""
This will help future test implementers to understand better what has been implemented. For example the withdrawals could be wrong for having something in execution_payload.withdrawals that is not in state.payload_expected_withdrawals. So that would be a different test. Even if in the specs it is clear that will be catched by the same assertion, we are testing this fact for the clients with the test vectors.
|
I agree that having more explicit function name and docstring is better. Given that other adjacent functions to the newly added one also have "wrong_XYZ" suffix, how about having another PR that improves them, including this one? cc @leolara |
Noticed spec test is missing a test vector where payload has wrong withdrawals.
Also fix the default value of builder index and one's not provided in
prepare_signed_execution_payload_bid