mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-20 23:49:54 +00:00
use List with limit to hash withdrawals
This commit is contained in:
parent
9274a66199
commit
f97f0b4ef2
@ -445,7 +445,8 @@ def process_withdrawals(state: BeaconState) -> None:
|
||||
return
|
||||
|
||||
withdrawals, partial_withdrawals_count = get_expected_withdrawals(state)
|
||||
state.latest_withdrawals_root = hash_tree_root(withdrawals)
|
||||
withdrawals_list = List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD](withdrawals)
|
||||
state.latest_withdrawals_root = hash_tree_root(withdrawals_list)
|
||||
for withdrawal in withdrawals:
|
||||
decrease_balance(state, withdrawal.validator_index, withdrawal.amount)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user