From f2a6ac17b255fe037bf528bc8368e61051cd4df4 Mon Sep 17 00:00:00 2001 From: Aaron Chen Date: Tue, 26 Mar 2024 19:26:44 +0800 Subject: [PATCH] eth/catalyst: fix flaw in withdrawal-gathering in simulated beacon (#29344) return after reaching maxCount --- eth/catalyst/simulated_beacon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/catalyst/simulated_beacon.go b/eth/catalyst/simulated_beacon.go index 4ae60ed490..fecd83f276 100644 --- a/eth/catalyst/simulated_beacon.go +++ b/eth/catalyst/simulated_beacon.go @@ -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