expected deposit count test
This commit is contained in:
parent
64e15c524b
commit
1d6b1cab13
|
@ -171,6 +171,28 @@ def test_attester_slashing(spec, state):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@with_all_phases
|
||||||
|
@spec_state_test
|
||||||
|
def test_expected_deposit_in_block(spec, state):
|
||||||
|
# Make the state expect a deposit, then don't provide it.
|
||||||
|
state.eth1_data.deposit_count += 1
|
||||||
|
yield 'pre', state
|
||||||
|
|
||||||
|
block = build_empty_block_for_next_slot(spec, state)
|
||||||
|
sign_block(spec, state, block)
|
||||||
|
bad = False
|
||||||
|
try:
|
||||||
|
state_transition_and_sign_block(spec, state, block)
|
||||||
|
bad = True
|
||||||
|
except AssertionError:
|
||||||
|
pass
|
||||||
|
if bad:
|
||||||
|
raise AssertionError("expected deposit was not enforced")
|
||||||
|
|
||||||
|
yield 'blocks', [block]
|
||||||
|
yield 'post', None
|
||||||
|
|
||||||
|
|
||||||
@with_all_phases
|
@with_all_phases
|
||||||
@spec_state_test
|
@spec_state_test
|
||||||
def test_deposit_in_block(spec, state):
|
def test_deposit_in_block(spec, state):
|
||||||
|
|
Loading…
Reference in New Issue