Skip to content

Commit

Permalink
Add new test
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia committed Oct 30, 2024
1 parent 5a6121b commit dfb3ca6
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ def test_new_deposit_over_max(spec, state):
yield from run_deposit_processing(spec, state, deposit, validator_index)


@with_all_phases
@spec_state_test
def test_new_deposit_with_bad_signature(spec, state):
# fresh deposit = next validator index = validator appended to registry
validator_index = len(state.validators)
# a deposit that is not signed
amount = spec.EFFECTIVE_BALANCE_INCREMENT
deposit = prepare_state_and_deposit(spec, state, validator_index, amount, signed=False)
# save state so we can access pending deposits later
pre_state = state

yield from run_deposit_processing(spec, state, deposit, validator_index, effective=False)

if is_post_electra(spec):
# there should not be a new pending deposit
assert state.pending_deposits == pre_state.pending_deposits


@with_all_phases
@spec_state_test
def test_new_deposit_eth1_withdrawal_credentials(spec, state):
Expand Down

0 comments on commit dfb3ca6

Please sign in to comment.