From c871733bf35bc6644dbe73d389e6640ad9959a78 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Mon, 29 Jun 2020 19:48:07 +0800 Subject: [PATCH] Fix yield block --- .../eth2spec/test/phase1/sanity/test_blocks.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/phase1/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/phase1/sanity/test_blocks.py index 2f4c0b67b..508feb65d 100644 --- a/tests/core/pyspec/eth2spec/test/phase1/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/phase1/sanity/test_blocks.py @@ -25,13 +25,13 @@ def run_beacon_block(spec, state, block, valid=True): yield 'pre', state.copy() if not valid: - state_transition_and_sign_block(spec, state, block, expect_fail=True) - yield 'block', block + signed_beacon_block = state_transition_and_sign_block(spec, state, block, expect_fail=True) + yield 'block', signed_beacon_block yield 'post', None return - state_transition_and_sign_block(spec, state, block) - yield 'block', block + signed_beacon_block = state_transition_and_sign_block(spec, state, block) + yield 'block', signed_beacon_block yield 'post', state @@ -73,8 +73,8 @@ def run_beacon_block_with_shard_blocks(spec, state, target_len_offset_slot, comm yield 'post', None return - state_transition_and_sign_block(spec, state, beacon_block) - yield 'block', beacon_block + signed_beacon_block = state_transition_and_sign_block(spec, state, beacon_block) + yield 'block', signed_beacon_block yield 'post', state for shard in range(spec.get_active_shard_count(state)): @@ -159,7 +159,7 @@ def test_with_custody_challenge_and_response(spec, state): block.body.attestations = [attestation] block.body.shard_transitions = shard_transitions - # Custody operations + # CustodyChunkChallenge and CustodyChunkResponse operations challenge = get_valid_chunk_challenge(spec, state, attestation, shard_transitions[shard]) block.body.chunk_challenges = [challenge] chunk_challenge_index = state.custody_chunk_challenge_index