mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-17 13:06:34 +00:00
Merge pull request #64 from terenc3t/patch-1
fixed typos in change_validators
This commit is contained in:
commit
d158e11006
@ -605,7 +605,7 @@ def change_validators(validators):
|
|||||||
total_balance = sum([v.balance for i, v in enumerate(validators) if i in active_validators])
|
total_balance = sum([v.balance for i, v in enumerate(validators) if i in active_validators])
|
||||||
# The maximum total wei that can deposit+withdraw
|
# The maximum total wei that can deposit+withdraw
|
||||||
max_allowable_change = max(
|
max_allowable_change = max(
|
||||||
2 * DEPOSIT_SIZE GWEI_PER_ETH,
|
2 * DEPOSIT_SIZE * GWEI_PER_ETH,
|
||||||
total_balance // MAX_VALIDATOR_CHURN_QUOTIENT
|
total_balance // MAX_VALIDATOR_CHURN_QUOTIENT
|
||||||
)
|
)
|
||||||
# Go through the list start to end depositing+withdrawing as many as possible
|
# Go through the list start to end depositing+withdrawing as many as possible
|
||||||
@ -613,7 +613,7 @@ def change_validators(validators):
|
|||||||
for i in range(len(validators)):
|
for i in range(len(validators)):
|
||||||
if validators[i].status == PENDING_ACTIVATION:
|
if validators[i].status == PENDING_ACTIVATION:
|
||||||
validators[i].status = ACTIVE
|
validators[i].status = ACTIVE
|
||||||
total_changed += DEPOSIT_SIZE
|
total_changed += DEPOSIT_SIZE * GWEI_PER_ETH
|
||||||
add_validator_set_change_record(crystallized_state, i, validators[i].pubkey, ENTRY)
|
add_validator_set_change_record(crystallized_state, i, validators[i].pubkey, ENTRY)
|
||||||
if validators[i].status == PENDING_EXIT:
|
if validators[i].status == PENDING_EXIT:
|
||||||
validators[i].status = PENDING_WITHDRAW
|
validators[i].status = PENDING_WITHDRAW
|
||||||
|
Loading…
x
Reference in New Issue
Block a user