Skip to content

Commit 001caab

Browse files
authored
Merge pull request ethereum#4048 from jtraglia/fix-pending-deposit-invalid-sig-test
2 parents 7242a27 + 702dfc9 commit 001caab

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/core/pyspec/eth2spec/test/electra/epoch_processing/pending_deposits/test_apply_pending_deposit.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,15 @@ def test_apply_pending_deposit_top_up__zero_balance(spec, state):
308308
def test_apply_pending_deposit_incorrect_sig_top_up(spec, state):
309309
validator_index = 0
310310
amount = spec.MIN_ACTIVATION_BALANCE // 4
311-
pending_deposit = prepare_pending_deposit(spec, validator_index, amount, signed=True)
311+
pending_deposit = prepare_pending_deposit(spec, validator_index, amount, signed=False)
312+
313+
# ensure the deposit signature is incorrect
314+
assert not spec.is_valid_deposit_signature(
315+
pending_deposit.pubkey,
316+
pending_deposit.withdrawal_credentials,
317+
pending_deposit.amount,
318+
pending_deposit.signature
319+
)
312320

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

0 commit comments

Comments
 (0)