From 702dfc97349f06f497079dccb89142e4ccd39236 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Fri, 13 Dec 2024 17:25:18 -0600 Subject: [PATCH] Use incorrect signature in pending deposit top up test --- .../pending_deposits/test_apply_pending_deposit.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/core/pyspec/eth2spec/test/electra/epoch_processing/pending_deposits/test_apply_pending_deposit.py b/tests/core/pyspec/eth2spec/test/electra/epoch_processing/pending_deposits/test_apply_pending_deposit.py index 0c920d56a3..ccbfbc13a3 100644 --- a/tests/core/pyspec/eth2spec/test/electra/epoch_processing/pending_deposits/test_apply_pending_deposit.py +++ b/tests/core/pyspec/eth2spec/test/electra/epoch_processing/pending_deposits/test_apply_pending_deposit.py @@ -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)