cmd/swarm: do not ignore cache size=0 (#19231)

This commit is contained in:
Elad 2019-03-07 18:44:00 +07:00 committed by Anton Evangelatov
parent 316b63daf0
commit 4687391213

View File

@ -255,8 +255,8 @@ func cmdLineOverride(currentConfig *bzzapi.Config, ctx *cli.Context) *bzzapi.Con
currentConfig.LocalStoreParams.DbCapacity = storeCapacity currentConfig.LocalStoreParams.DbCapacity = storeCapacity
} }
if storeCacheCapacity := ctx.GlobalUint(SwarmStoreCacheCapacity.Name); storeCacheCapacity != 0 { if ctx.GlobalIsSet(SwarmStoreCacheCapacity.Name) {
currentConfig.LocalStoreParams.CacheCapacity = storeCacheCapacity currentConfig.LocalStoreParams.CacheCapacity = ctx.GlobalUint(SwarmStoreCacheCapacity.Name)
} }
if ctx.GlobalIsSet(SwarmBootnodeModeFlag.Name) { if ctx.GlobalIsSet(SwarmBootnodeModeFlag.Name) {