Skip to content

Commit f00cbca

Browse files
AaronChen0jorgemmsilva
authored andcommitted
eth/catalyst: fix flaw in withdrawal-gathering in simulated beacon (ethereum#29344)
return after reaching maxCount
1 parent f1fdb07 commit f00cbca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/catalyst/simulated_beacon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (w *withdrawalQueue) gatherPending(maxCount int) []*types.Withdrawal {
6363
case withdrawal := <-w.pending:
6464
withdrawals = append(withdrawals, withdrawal)
6565
if len(withdrawals) == maxCount {
66-
break
66+
return withdrawals
6767
}
6868
default:
6969
return withdrawals

0 commit comments

Comments
 (0)