From 41861f1944901829ed66d164d8e5847a0994dbd4 Mon Sep 17 00:00:00 2001 From: mickychang9 Date: Thu, 11 Sep 2025 19:10:46 +0800 Subject: [PATCH] refactor: use the built-in max/min to simplify the code Signed-off-by: mickychang9 --- cmd/fireeth/tools_fix_withdrawals.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/fireeth/tools_fix_withdrawals.go b/cmd/fireeth/tools_fix_withdrawals.go index 8f69b4df..adb4cb88 100644 --- a/cmd/fireeth/tools_fix_withdrawals.go +++ b/cmd/fireeth/tools_fix_withdrawals.go @@ -65,10 +65,7 @@ func createFixWithdrawalsE(logger *zap.Logger) firecore.CommandExecutor { maxConcurrency := sflags.MustGetInt(cmd, "max-concurrency") if maxConcurrency == 0 { - maxConcurrency = runtime.GOMAXPROCS(0) - if maxConcurrency < 1 { - maxConcurrency = 1 - } + maxConcurrency = max(runtime.GOMAXPROCS(0), 1) } if stop <= start {