Skip to content

Commit

Permalink
Merge pull request #4048 from jtraglia/fix-pending-deposit-invalid-si…
Browse files Browse the repository at this point in the history
…g-test
  • Loading branch information
jtraglia authored Dec 14, 2024
2 parents 7242a27 + 702dfc9 commit 001caab
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,15 @@ def test_apply_pending_deposit_top_up__zero_balance(spec, state):
def test_apply_pending_deposit_incorrect_sig_top_up(spec, state):
validator_index = 0
amount = spec.MIN_ACTIVATION_BALANCE // 4
pending_deposit = prepare_pending_deposit(spec, validator_index, amount, signed=True)
pending_deposit = prepare_pending_deposit(spec, validator_index, amount, signed=False)

# ensure the deposit signature is incorrect
assert not spec.is_valid_deposit_signature(
pending_deposit.pubkey,
pending_deposit.withdrawal_credentials,
pending_deposit.amount,
pending_deposit.signature
)

# invalid signatures, in top-ups, are allowed!
yield from run_pending_deposit_applying(spec, state, pending_deposit, validator_index)
Expand Down

0 comments on commit 001caab

Please sign in to comment.