From 0e2e494d7e71ff01e2fc55f00c9e632c9c9f1db8 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Mon, 28 Sep 2020 19:32:42 -0600 Subject: [PATCH] fix function signature calls on deposit helpers --- .../pyspec/eth2spec/test/helpers/deposits.py | 22 +++++++++---------- .../test/phase0/genesis/test_validity.py | 21 +++++++++++++++--- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/helpers/deposits.py b/tests/core/pyspec/eth2spec/test/helpers/deposits.py index 150de07db..565f4bb53 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/deposits.py +++ b/tests/core/pyspec/eth2spec/test/helpers/deposits.py @@ -80,12 +80,12 @@ def prepare_full_genesis_deposits(spec, withdrawal_credentials = spec.BLS_WITHDRAWAL_PREFIX + spec.hash(pubkey)[1:] deposit, root, deposit_data_list = build_deposit( spec, - deposit_data_list, - pubkey, - privkey, - amount, - withdrawal_credentials, - signed, + deposit_data_list=deposit_data_list, + pubkey=pubkey, + privkey=privkey, + amount=amount, + withdrawal_credentials=withdrawal_credentials, + signed=signed, ) genesis_deposits.append(deposit) @@ -116,11 +116,11 @@ def prepare_random_genesis_deposits(spec, withdrawal_credentials = spec.BLS_WITHDRAWAL_PREFIX + spec.hash(random_byte)[1:] deposit, root, deposit_data_list = build_deposit( spec, - deposit_data_list, - pubkey, - privkey, - amount, - withdrawal_credentials, + deposit_data_list=deposit_data_list, + pubkey=pubkey, + privkey=privkey, + amount=amount, + withdrawal_credentials=withdrawal_credentials, signed=True, ) deposits.append(deposit) diff --git a/tests/core/pyspec/eth2spec/test/phase0/genesis/test_validity.py b/tests/core/pyspec/eth2spec/test/phase0/genesis/test_validity.py index 832ad597f..486f65076 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/genesis/test_validity.py +++ b/tests/core/pyspec/eth2spec/test/phase0/genesis/test_validity.py @@ -6,7 +6,12 @@ from eth2spec.test.helpers.deposits import ( def create_valid_beacon_state(spec): deposit_count = spec.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT - deposits, _, _ = prepare_full_genesis_deposits(spec, deposit_count, spec.MAX_EFFECTIVE_BALANCE, signed=True) + deposits, _, _ = prepare_full_genesis_deposits( + spec, + amount=spec.MAX_EFFECTIVE_BALANCE, + pubkey_max_range=deposit_count, + signed=True, + ) eth1_block_hash = b'\x12' * 32 eth1_timestamp = spec.MIN_GENESIS_TIME @@ -69,7 +74,12 @@ def test_is_valid_genesis_state_true_more_balance(spec): @single_phase def test_is_valid_genesis_state_true_one_more_validator(spec): deposit_count = spec.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT + 1 - deposits, _, _ = prepare_full_genesis_deposits(spec, deposit_count, spec.MAX_EFFECTIVE_BALANCE, signed=True) + deposits, _, _ = prepare_full_genesis_deposits( + spec, + amount=spec.MAX_EFFECTIVE_BALANCE, + pubkey_max_range=deposit_count, + signed=True, + ) eth1_block_hash = b'\x12' * 32 eth1_timestamp = spec.MIN_GENESIS_TIME @@ -83,7 +93,12 @@ def test_is_valid_genesis_state_true_one_more_validator(spec): @single_phase def test_is_valid_genesis_state_false_not_enough_validator(spec): deposit_count = spec.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT - 1 - deposits, _, _ = prepare_full_genesis_deposits(spec, deposit_count, spec.MAX_EFFECTIVE_BALANCE, signed=True) + deposits, _, _ = prepare_full_genesis_deposits( + spec, + amount=spec.MAX_EFFECTIVE_BALANCE, + pubkey_max_range=deposit_count, + signed=True, + ) eth1_block_hash = b'\x12' * 32 eth1_timestamp = spec.MIN_GENESIS_TIME