diff --git a/cmd/neofs-node/config/morph/config.go b/cmd/neofs-node/config/morph/config.go index b6da9eb71d..a5e8d08e65 100644 --- a/cmd/neofs-node/config/morph/config.go +++ b/cmd/neofs-node/config/morph/config.go @@ -52,3 +52,9 @@ func DialTimeout(c *config.Config) time.Duration { return DialTimeoutDefault } + +// DisableCache returns value of "disable_cache" config parameter +// from "morph" section. +func DisableCache(c *config.Config) bool { + return config.BoolSafe(c.Sub(subsection), "disable_cache") +} diff --git a/cmd/neofs-node/config/morph/config_test.go b/cmd/neofs-node/config/morph/config_test.go index babe4e0722..3f9946be10 100644 --- a/cmd/neofs-node/config/morph/config_test.go +++ b/cmd/neofs-node/config/morph/config_test.go @@ -17,6 +17,7 @@ func TestMorphSection(t *testing.T) { require.Panics(t, func() { morphconfig.RPCEndpoint(empty) }) require.Panics(t, func() { morphconfig.NotificationEndpoint(empty) }) require.Equal(t, morphconfig.DialTimeoutDefault, morphconfig.DialTimeout(empty)) + require.Equal(t, false, morphconfig.DisableCache(empty)) }) const path = "../../../../config/example/node" @@ -37,6 +38,7 @@ func TestMorphSection(t *testing.T) { require.Equal(t, rpcs, morphconfig.RPCEndpoint(c)) require.Equal(t, wss, morphconfig.NotificationEndpoint(c)) require.Equal(t, 30*time.Second, morphconfig.DialTimeout(c)) + require.Equal(t, true, morphconfig.DisableCache(c)) } configtest.ForEachFileType(path, fileConfigTest) diff --git a/config/example/README.md b/config/example/README.md index eb3e494afd..9c5c46267a 100644 --- a/config/example/README.md +++ b/config/example/README.md @@ -4,7 +4,7 @@ Here are files in all supported formats and with all possible configuration valu of NeoFS applications. All parameters are correct, however, they are for informational purposes only. -It is not recommended to transfer these configs for real application launches. +It is not recommended transferring these configs for real application launches. ## Config files diff --git a/config/example/node.env b/config/example/node.env index d3944d1e1f..e6a6b1ad3d 100644 --- a/config/example/node.env +++ b/config/example/node.env @@ -42,6 +42,7 @@ NEOFS_CONTRACTS_REPUTATION=441995f631c1da2b133462b71859494a5cd45e90 # Morph chain section NEOFS_MORPH_DIAL_TIMEOUT=30s +NEOFS_MORPH_DISABLE_CACHE=true NEOFS_MORPH_RPC_ENDPOINT=https://rpc1.morph.fs.neo.org:40341 https://rpc2.morph.fs.neo.org:40341 NEOFS_MORPH_NOTIFICATION_ENDPOINT=wss://rpc1.morph.fs.neo.org:40341/ws wss://rpc2.morph.fs.neo.org:40341/ws diff --git a/config/example/node.json b/config/example/node.json index e8ef365864..4a16366ae3 100644 --- a/config/example/node.json +++ b/config/example/node.json @@ -61,6 +61,7 @@ }, "morph": { "dial_timeout": "30s", + "disable_cache": true, "rpc_endpoint": [ "https://rpc1.morph.fs.neo.org:40341", "https://rpc2.morph.fs.neo.org:40341" diff --git a/config/example/node.yaml b/config/example/node.yaml index 31f2911ed4..4e1ea9918e 100644 --- a/config/example/node.yaml +++ b/config/example/node.yaml @@ -53,6 +53,7 @@ contracts: morph: dial_timeout: 30s + disable_cache: true rpc_endpoint: - https://rpc1.morph.fs.neo.org:40341 - https://rpc2.morph.fs.neo.org:40341 diff --git a/pkg/services/object/acl/eacl/types.go b/pkg/services/object/acl/eacl/types.go index e18730d4b3..973c9ce2d0 100644 --- a/pkg/services/object/acl/eacl/types.go +++ b/pkg/services/object/acl/eacl/types.go @@ -15,7 +15,7 @@ type Storage interface { // GetEACL must return exactly one non-nil value. // // Must return pkg/core/container.ErrEACLNotFound if requested - // eACL table is is not in storage. + // eACL table is not in storage. GetEACL(*cid.ID) (*eacl.Table, error) }