Skip to content

Commit

Permalink
cmd: correct condition to bump cache on mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlee42 committed Oct 24, 2024
1 parent f444f35 commit 8531b25
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,11 @@ func prepare(ctx *cli.Context) {
`)

case ctx.IsSet(utils.GoatNetworkFlag.Name):
log.Info("Starting geth on GOAT network...", "network", ctx.String(utils.GoatNetworkFlag.Name))

log.Info("Starting Geth on GOAT network...", "network", ctx.String(utils.GoatNetworkFlag.Name))
if ctx.String(utils.GoatNetworkFlag.Name) == "mainnet" {
log.Info("Bumping default cache on mainnet to 4096")
ctx.Set(utils.CacheFlag.Name, strconv.Itoa(4096))
}
case !ctx.IsSet(utils.NetworkIdFlag.Name):
log.Info("Starting Geth on Ethereum mainnet...")
}
Expand All @@ -324,7 +327,7 @@ func prepare(ctx *cli.Context) {
if !ctx.IsSet(utils.HoleskyFlag.Name) &&
!ctx.IsSet(utils.SepoliaFlag.Name) &&
!ctx.IsSet(utils.DeveloperFlag.Name) &&
ctx.String(utils.GoatNetworkFlag.Name) == "mainnet" {
!ctx.IsSet(utils.GoatNetworkFlag.Name) {
// Nope, we're really on mainnet. Bump that cache up!
log.Info("Bumping default cache on mainnet", "provided", ctx.Int(utils.CacheFlag.Name), "updated", 4096)
ctx.Set(utils.CacheFlag.Name, strconv.Itoa(4096))
Expand Down

0 comments on commit 8531b25

Please sign in to comment.