Skip to content

Commit

Permalink
Merge pull request #2 from etan-status/exclude-empty-requests
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia authored Nov 22, 2024
2 parents 36b4979 + 15e3f15 commit bfe166c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
get_signed_address_change,
)
from eth2spec.test.helpers.execution_payload import (
compute_el_block_hash,
compute_el_block_hash_for_block,
)
from eth2spec.test.helpers.voluntary_exits import (
prepare_signed_exits,
Expand Down Expand Up @@ -42,7 +42,7 @@ def test_basic_el_withdrawal_request(spec, state):
)
block = build_empty_block_for_next_slot(spec, state)
block.body.execution_requests.withdrawals = [withdrawal_request]
block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload, state)
block.body.execution_payload.block_hash = compute_el_block_hash_for_block(spec, block)
signed_block = state_transition_and_sign_block(spec, state, block)

yield 'blocks', [signed_block]
Expand Down Expand Up @@ -80,7 +80,7 @@ def test_basic_btec_and_el_withdrawal_request_in_same_block(spec, state):
)
block.body.execution_requests.withdrawals = [withdrawal_request]

block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload, state)
block.body.execution_payload.block_hash = compute_el_block_hash_for_block(spec, block)
signed_block = state_transition_and_sign_block(spec, state, block)

yield 'blocks', [signed_block]
Expand Down Expand Up @@ -132,7 +132,7 @@ def test_basic_btec_before_el_withdrawal_request(spec, state):
)
block_2 = build_empty_block_for_next_slot(spec, state)
block_2.body.execution_requests.withdrawals = [withdrawal_request]
block_2.body.execution_payload.block_hash = compute_el_block_hash(spec, block_2.body.execution_payload, state)
block_2.body.execution_payload.block_hash = compute_el_block_hash_for_block(spec, block_2)
signed_block_2 = state_transition_and_sign_block(spec, state, block_2)

yield 'blocks', [signed_block_1, signed_block_2]
Expand Down Expand Up @@ -165,7 +165,7 @@ def test_cl_exit_and_el_withdrawal_request_in_same_block(spec, state):
block = build_empty_block_for_next_slot(spec, state)
block.body.voluntary_exits = signed_voluntary_exits
block.body.execution_requests.withdrawals = [withdrawal_request]
block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload, state)
block.body.execution_payload.block_hash = compute_el_block_hash_for_block(spec, block)
signed_block = state_transition_and_sign_block(spec, state, block)

yield 'blocks', [signed_block]
Expand Down

0 comments on commit bfe166c

Please sign in to comment.