[#1593] node: Fix initialization of ape_chain cache
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 24s
Vulncheck / Vulncheck (push) Successful in 53s
Pre-commit hooks / Pre-commit (push) Successful in 1m29s
Build / Build Components (push) Successful in 1m54s
Tests and linters / Staticcheck (push) Successful in 2m20s
Tests and linters / Lint (push) Successful in 3m13s
Tests and linters / Tests (push) Successful in 3m49s
Tests and linters / Tests with -race (push) Successful in 4m34s
OCI image / Build container images (push) Successful in 4m43s
Tests and linters / gopls check (push) Successful in 4m37s

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2025-01-16 15:25:05 +03:00 committed by Evgenii Stratonikov
parent 57efa0bc8e
commit 80de5d70bf

View file

@ -1146,7 +1146,7 @@ func initAccessPolicyEngine(ctx context.Context, c *cfg) {
c.cfgObject.cfgAccessPolicyEngine.policyContractHash)
cacheSize := morphconfig.APEChainCacheSize(c.appCfg)
if cacheSize > 0 {
if cacheSize > 0 && c.cfgMorph.cacheTTL > 0 {
morphRuleStorage = newMorphCache(morphRuleStorage, int(cacheSize), c.cfgMorph.cacheTTL)
}