linting and typo

This commit is contained in:
Potuz 2022-10-31 16:52:07 -03:00 committed by Hsiao-Wei Wang
parent 49a2519da2
commit c156ea6adc
No known key found for this signature in database
GPG Key ID: AE3D6B174F971DE4
1 changed files with 3 additions and 3 deletions

View File

@ -292,7 +292,7 @@ def get_expected_withdrawals(state: BeaconState) -> Sequence[Withdrawal]:
while (len(ret) < MAX_WITHDRAWALS_PER_PAYLOAD) and (probed < len(state.validators)): while (len(ret) < MAX_WITHDRAWALS_PER_PAYLOAD) and (probed < len(state.validators)):
val = state.validators[index] val = state.validators[index]
balance = state.balances[index] balance = state.balances[index]
if is_fully_withdrawable(val, balance, epoch): if is_fully_withdrawable_validator(val, balance, epoch):
withdrawal = Withdrawal( withdrawal = Withdrawal(
index=withdrawal_index, index=withdrawal_index,
validator_index=index, validator_index=index,
@ -301,12 +301,12 @@ def get_expected_withdrawals(state: BeaconState) -> Sequence[Withdrawal]:
) )
ret.append(withdrawal) ret.append(withdrawal)
withdrawal_index = WithdrawalIndex(withdrawal_index + 1) withdrawal_index = WithdrawalIndex(withdrawal_index + 1)
elif is_partially_withdrawable(val, balance): elif is_partially_withdrawable_validator(val, balance):
withdrawal = Withdrawal( withdrawal = Withdrawal(
index=withdrawal_index, index=withdrawal_index,
validator_index=index, validator_index=index,
address=ExecutionAddress(val.withdrawal_credentials[12:]), address=ExecutionAddress(val.withdrawal_credentials[12:]),
amount=balance-MAX_EFFECTIVE_BALANCE, amount=balance - MAX_EFFECTIVE_BALANCE,
) )
ret.append(withdrawal) ret.append(withdrawal)
withdrawal_index = WithdrawalIndex(withdrawal_index + 1) withdrawal_index = WithdrawalIndex(withdrawal_index + 1)