Skip to content

Commit 66f5c37

Browse files
committed
Fix switch to compounding tests
1 parent 2dd9e82 commit 66f5c37

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/core/pyspec/eth2spec/test/electra/block_processing/test_process_consolidation_request.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,9 +1003,8 @@ def test_switch_to_compounding_source_bls_withdrawal_credential(spec, state):
10031003
# a bls withdrawal credential
10041004
current_epoch = spec.get_current_epoch(state)
10051005
source_index = spec.get_active_validator_indices(state, current_epoch)[0]
1006-
source_address = b"\x22" * 20
10071006
consolidation = spec.ConsolidationRequest(
1008-
source_address=source_address,
1007+
source_address=state.validators[source_index].withdrawal_credentials[12:],
10091008
source_pubkey=state.validators[source_index].pubkey,
10101009
target_pubkey=state.validators[source_index].pubkey,
10111010
)
@@ -1026,12 +1025,12 @@ def test_switch_to_compounding_source_coumpounding_withdrawal_credential(spec, s
10261025
current_epoch = spec.get_current_epoch(state)
10271026
source_index = spec.get_active_validator_indices(state, current_epoch)[0]
10281027
source_address = b"\x22" * 20
1028+
set_compounding_withdrawal_credential(spec, state, source_index, address=source_address)
10291029
consolidation = spec.ConsolidationRequest(
10301030
source_address=source_address,
10311031
source_pubkey=state.validators[source_index].pubkey,
10321032
target_pubkey=state.validators[source_index].pubkey,
10331033
)
1034-
set_compounding_withdrawal_credential(spec, state, source_index)
10351034
state.balances[source_index] = spec.MIN_ACTIVATION_BALANCE + spec.EFFECTIVE_BALANCE_INCREMENT
10361035

10371036
# Check the the return condition

0 commit comments

Comments
 (0)