eth/catalyst: fix flaw in withdrawal-gathering in simulated beacon (#29344)

return after reaching maxCount
This commit is contained in:
Aaron Chen 2024-03-26 19:26:44 +08:00 committed by GitHub
parent 738b5a586e
commit f2a6ac17b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -63,7 +63,7 @@ func (w *withdrawalQueue) gatherPending(maxCount int) []*types.Withdrawal {
case withdrawal := <-w.pending:
withdrawals = append(withdrawals, withdrawal)
if len(withdrawals) == maxCount {
break
return withdrawals
}
default:
return withdrawals