fix function signature calls on deposit helpers

This commit is contained in:
Danny Ryan 2020-09-28 19:32:42 -06:00
parent 76d69263fc
commit 0e2e494d7e
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
2 changed files with 29 additions and 14 deletions

View File

@ -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)

View File

@ -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