Skip to content

Commit 8e4a36f

Browse files
committed
adjust correct expected_withdrawals SSZ container
1 parent 78a0f6e commit 8e4a36f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

beacon_chain/spec/state_transition_block.nim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,15 +1156,15 @@ func process_withdrawals*(
11561156
HashList[PendingPartialWithdrawal, Limit PENDING_PARTIAL_WITHDRAWALS_LIMIT].init(
11571157
state.pending_partial_withdrawals.asSeq[partial_withdrawals_count .. ^1])
11581158
else:
1159-
let expected_withdrawals =
1160-
List[capella.Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD].init(
1161-
get_expected_withdrawals(state))
1159+
let expected_withdrawals = get_expected_withdrawals(state)
11621160

11631161
when payload is ForkyExecutionPayloadHeader:
1164-
if not (payload.withdrawals_root == hash_tree_root(expected_withdrawals)):
1162+
if not (payload.withdrawals_root == hash_tree_root(
1163+
List[capella.Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD].init(
1164+
expected_withdrawals))):
11651165
return err("process_withdrawals: withdrawals_root does not match expected withdrawals")
11661166
else:
1167-
if payload.withdrawals.asSeq() != expected_withdrawals.distinctBase:
1167+
if payload.withdrawals.asSeq() != expected_withdrawals:
11681168
return err("process_withdrawals: payload withdrawals don't match expected withdrawals")
11691169

11701170
for withdrawal in expected_withdrawals:

0 commit comments

Comments
 (0)