Merge pull request #1544 from ethereum/fix-v093-tests

Fix v093 tests: 2 pre-states missed, 1 unsigned block
This commit is contained in:
Danny Ryan 2019-12-19 13:28:35 -07:00 committed by GitHub
commit 91fc7fd4bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -83,7 +83,7 @@ def test_invalid_state_root(spec, state):
expect_assertion_error(lambda: spec.state_transition(state, signed_block)) expect_assertion_error(lambda: spec.state_transition(state, signed_block))
yield 'blocks', [block] yield 'blocks', [signed_block]
yield 'post', None yield 'post', None
@ -91,6 +91,8 @@ def test_invalid_state_root(spec, state):
@spec_state_test @spec_state_test
@always_bls @always_bls
def test_zero_block_sig(spec, state): def test_zero_block_sig(spec, state):
yield 'pre', state
block = build_empty_block_for_next_slot(spec, state) block = build_empty_block_for_next_slot(spec, state)
invalid_signed_block = spec.SignedBeaconBlock(message=block) invalid_signed_block = spec.SignedBeaconBlock(message=block)
expect_assertion_error(lambda: spec.state_transition(state, invalid_signed_block)) expect_assertion_error(lambda: spec.state_transition(state, invalid_signed_block))
@ -103,6 +105,8 @@ def test_zero_block_sig(spec, state):
@spec_state_test @spec_state_test
@always_bls @always_bls
def test_invalid_block_sig(spec, state): def test_invalid_block_sig(spec, state):
yield 'pre', state
block = build_empty_block_for_next_slot(spec, state) block = build_empty_block_for_next_slot(spec, state)
invalid_signed_block = spec.SignedBeaconBlock( invalid_signed_block = spec.SignedBeaconBlock(
message=block, message=block,