File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1498,12 +1498,19 @@ template get_expected_withdrawals_with_partial_count_aux*(
14981498
14991499 has_sufficient_effective_balance =
15001500 effective_balance_at_slot >= static (MIN_ACTIVATION_BALANCE .Gwei )
1501- has_excess_balance = fetch_balance > static (MIN_ACTIVATION_BALANCE .Gwei )
1501+ total_withdrawn = block :
1502+ var res: Gwei
1503+ for w in withdrawals:
1504+ if w.validator_index == validator_index:
1505+ res += w.amount
1506+ res
1507+ balance = fetch_balance - total_withdrawn
1508+ has_excess_balance = balance > static (MIN_ACTIVATION_BALANCE .Gwei )
15021509 if validator.exit_epoch == FAR_FUTURE_EPOCH and
15031510 has_sufficient_effective_balance and has_excess_balance:
15041511 let
15051512 withdrawable_balance = min (
1506- fetch_balance - static (MIN_ACTIVATION_BALANCE .Gwei ),
1513+ balance - static (MIN_ACTIVATION_BALANCE .Gwei ),
15071514 withdrawal.amount)
15081515 var w = Withdrawal (
15091516 index: withdrawal_index,
You can’t perform that action at this time.
0 commit comments