Skip to content

Commit 5c140b1

Browse files
committed
Apply PR#1677 feedback
1 parent ae65c40 commit 5c140b1

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

tests/beacon/conftest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,7 @@ def ten_validators_state(empty_beacon_state, max_deposit, far_future_slot):
385385
)
386386
for pubkey in range(validator_count)
387387
),
388-
validator_balances=tuple(
389-
max_deposit * GWEI_PER_ETH
390-
for _ in range(validator_count)
391-
)
388+
validator_balances=(max_deposit * GWEI_PER_ETH,) * validator_count,
392389
)
393390

394391

@@ -482,10 +479,12 @@ def deposit_contract_tree_depth():
482479
def min_deposit():
483480
return SERENITY_CONFIG.MIN_DEPOSIT
484481

482+
485483
@pytest.fixture
486484
def max_deposit():
487485
return SERENITY_CONFIG.MAX_DEPOSIT
488486

487+
489488
@pytest.fixture
490489
def genesis_fork_version():
491490
return SERENITY_CONFIG.GENESIS_FORK_VERSION

tests/beacon/state_machines/test_proposer_signature_validation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ def test_validate_serenity_proposer_signature(
5757
mock_validator_record(proposer_pubkey, far_future_slot)
5858
for _ in range(10)
5959
),
60-
validator_balances=tuple(
61-
max_deposit * GWEI_PER_ETH
62-
for _ in range(10)
63-
),
60+
validator_balances=(max_deposit * GWEI_PER_ETH,) * 10,
6461
shard_committees_at_slots=get_sample_shard_committees_at_slots(
6562
num_slot=128,
6663
num_shard_committee_per_slot=10,

tests/beacon/test_deposit_helpers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ def test_add_pending_validator(sample_beacon_state_params,
3636
ValidatorRecord(**sample_validator_record_params)
3737
for _ in range(validator_registry_len)
3838
],
39-
validator_balances=[
40-
100
41-
for _ in range(validator_registry_len)
42-
],
39+
validator_balances=(100,) * validator_registry_len,
4340
)
4441
validator = ValidatorRecord(**sample_validator_record_params)
4542
amount = 5566

tests/beacon/types/test_states.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ def test_num_validators(expected,
5252
)
5353
for pubkey in range(expected)
5454
),
55-
validator_balances=tuple(
56-
max_deposit * GWEI_PER_ETH
57-
for _ in range(expected)
58-
)
55+
validator_balances=(max_deposit * GWEI_PER_ETH,) * expected,
5956
)
6057

6158
assert state.num_validators == expected

0 commit comments

Comments
 (0)