From f97f0b4ef235de858c0ceebb392feddfc203e798 Mon Sep 17 00:00:00 2001 From: Potuz Date: Mon, 8 Jul 2024 15:12:56 -0300 Subject: [PATCH] use List with limit to hash withdrawals --- specs/_features/eip7732/beacon-chain.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/_features/eip7732/beacon-chain.md b/specs/_features/eip7732/beacon-chain.md index db81f9cd1..d4a37be46 100644 --- a/specs/_features/eip7732/beacon-chain.md +++ b/specs/_features/eip7732/beacon-chain.md @@ -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)