From 4687391213d9eb5c418a00d157b360c8d535b62f Mon Sep 17 00:00:00 2001 From: Elad Date: Thu, 7 Mar 2019 18:44:00 +0700 Subject: [PATCH] cmd/swarm: do not ignore cache size=0 (#19231) --- cmd/swarm/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go index 0e1e5e39ba..a941b37579 100644 --- a/cmd/swarm/config.go +++ b/cmd/swarm/config.go @@ -255,8 +255,8 @@ func cmdLineOverride(currentConfig *bzzapi.Config, ctx *cli.Context) *bzzapi.Con currentConfig.LocalStoreParams.DbCapacity = storeCapacity } - if storeCacheCapacity := ctx.GlobalUint(SwarmStoreCacheCapacity.Name); storeCacheCapacity != 0 { - currentConfig.LocalStoreParams.CacheCapacity = storeCacheCapacity + if ctx.GlobalIsSet(SwarmStoreCacheCapacity.Name) { + currentConfig.LocalStoreParams.CacheCapacity = ctx.GlobalUint(SwarmStoreCacheCapacity.Name) } if ctx.GlobalIsSet(SwarmBootnodeModeFlag.Name) {