diff --git a/cmd/harmony/config.go b/cmd/harmony/config.go index 037221835..0b798551a 100644 --- a/cmd/harmony/config.go +++ b/cmd/harmony/config.go @@ -161,9 +161,15 @@ func getDefaultCacheConfig(nt nodeconfig.NetworkType) harmonyconfig.CacheConfig case nodeconfig.Mainnet: cacheConfig.Disabled = true cacheConfig.Preimages = true + cacheConfig.SnapshotLimit = 0 case nodeconfig.Testnet: - cacheConfig.Disabled = false + cacheConfig.Disabled = true + cacheConfig.Preimages = true + cacheConfig.SnapshotLimit = 0 + case nodeconfig.Partner: + cacheConfig.Disabled = true cacheConfig.Preimages = true + cacheConfig.SnapshotLimit = 0 case nodeconfig.Localnet: cacheConfig.Disabled = false cacheConfig.Preimages = false diff --git a/cmd/harmony/flags_test.go b/cmd/harmony/flags_test.go index ffe261b39..50ed02fa2 100644 --- a/cmd/harmony/flags_test.go +++ b/cmd/harmony/flags_test.go @@ -1440,7 +1440,7 @@ func TestCacheFlags(t *testing.T) { TrieNodeLimit: defaultCacheConfig.TrieNodeLimit, TriesInMemory: defaultCacheConfig.TriesInMemory, TrieTimeLimit: defaultCacheConfig.TrieTimeLimit, - SnapshotLimit: defaultCacheConfig.SnapshotLimit, + SnapshotLimit: 0, // based on network type, SnapshotWait: defaultCacheConfig.SnapshotWait, Preimages: defaultCacheConfig.Preimages, // based on network type SnapshotNoBuild: defaultCacheConfig.SnapshotNoBuild,