check invalid state root
This commit is contained in:
parent
8445d1d90c
commit
f7b3c87715
|
@ -66,6 +66,22 @@ def test_empty_block_transition(spec, state):
|
||||||
assert spec.get_randao_mix(state, spec.get_current_epoch(state)) != spec.ZERO_HASH
|
assert spec.get_randao_mix(state, spec.get_current_epoch(state)) != spec.ZERO_HASH
|
||||||
|
|
||||||
|
|
||||||
|
@with_all_phases
|
||||||
|
@spec_state_test
|
||||||
|
def test_invalid_state_root(spec, state):
|
||||||
|
yield 'pre', state
|
||||||
|
|
||||||
|
block = build_empty_block_for_next_slot(spec, state)
|
||||||
|
block.state_root = b"\xaa" * 32
|
||||||
|
sign_block(spec, state, block)
|
||||||
|
|
||||||
|
expect_assertion_error(
|
||||||
|
lambda: spec.state_transition(state, block, validate_state_root=True))
|
||||||
|
|
||||||
|
yield 'blocks', [block]
|
||||||
|
yield 'post', None
|
||||||
|
|
||||||
|
|
||||||
@with_all_phases
|
@with_all_phases
|
||||||
@spec_state_test
|
@spec_state_test
|
||||||
def test_skipped_slots(spec, state):
|
def test_skipped_slots(spec, state):
|
||||||
|
|
Loading…
Reference in New Issue