From 9e4753b86e90eaa25205ffdb8ddd86dd26f02ac5 Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Wed, 13 May 2026 20:07:09 +0800 Subject: [PATCH] cmd/geth: fix ctx.IsSet return true even flags like --sepolia=false --- cmd/geth/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 850e26d161..7a900dd139 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -303,13 +303,13 @@ func main() { func prepare(ctx *cli.Context) { // If we're running a known preset, log it for convenience. switch { - case ctx.IsSet(utils.SepoliaFlag.Name): + case ctx.Bool(utils.SepoliaFlag.Name): log.Info("Starting Geth on Sepolia testnet...") - case ctx.IsSet(utils.HoleskyFlag.Name): + case ctx.Bool(utils.HoleskyFlag.Name): log.Info("Starting Geth on Holesky testnet...") - case ctx.IsSet(utils.HoodiFlag.Name): + case ctx.Bool(utils.HoodiFlag.Name): log.Info("Starting Geth on Hoodi testnet...") case !ctx.IsSet(utils.NetworkIdFlag.Name):