diff --git a/tests/core/pyspec/eth2spec/test/helpers/block.py b/tests/core/pyspec/eth2spec/test/helpers/block.py index 64f406633..0dd9dc98e 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/block.py +++ b/tests/core/pyspec/eth2spec/test/helpers/block.py @@ -61,6 +61,7 @@ def transition_unsigned_block(spec, state, block): assert state.latest_block_header.slot < block.slot # There may not already be a block in this slot or past it. assert state.slot == block.slot # The block must be for this slot spec.process_block(state, block) + return block def apply_empty_block(spec, state, slot=None): @@ -68,7 +69,7 @@ def apply_empty_block(spec, state, slot=None): Transition via an empty block (on current slot, assuming no block has been applied yet). """ block = build_empty_block(spec, state, slot) - transition_unsigned_block(spec, state, block) + return transition_unsigned_block(spec, state, block) def build_empty_block(spec, state, slot=None): diff --git a/tests/core/pyspec/eth2spec/test/helpers/state.py b/tests/core/pyspec/eth2spec/test/helpers/state.py index d61df7610..85d1eed5e 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/state.py +++ b/tests/core/pyspec/eth2spec/test/helpers/state.py @@ -62,7 +62,7 @@ def next_epoch_via_block(spec, state): """ Transition to the start slot of the next epoch via a full block transition """ - apply_empty_block(spec, state, state.slot + spec.SLOTS_PER_EPOCH - state.slot % spec.SLOTS_PER_EPOCH) + return apply_empty_block(spec, state, state.slot + spec.SLOTS_PER_EPOCH - state.slot % spec.SLOTS_PER_EPOCH) def get_state_root(spec, state, slot) -> bytes: