Skip to content

Commit

Permalink
fix function signature calls on deposit helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
djrtwo committed Sep 29, 2020
1 parent 76d6926 commit 0e2e494
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
22 changes: 11 additions & 11 deletions tests/core/pyspec/eth2spec/test/helpers/deposits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
21 changes: 18 additions & 3 deletions tests/core/pyspec/eth2spec/test/phase0/genesis/test_validity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0e2e494

Please sign in to comment.