From 19e97e4d7c36140ddb768d80f8c693a86af1959f Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 9 Sep 2021 17:13:35 +0300 Subject: [PATCH] [#807] node: Fix notary container invocation Create non-notary container wrapper and use it in load announcing since it shouldn't be invoked as notary request. Signed-off-by: Pavel Karpy --- cmd/neofs-node/container.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/neofs-node/container.go b/cmd/neofs-node/container.go index 0b7ab2b5..ffa3c425 100644 --- a/cmd/neofs-node/container.go +++ b/cmd/neofs-node/container.go @@ -41,9 +41,16 @@ const ( ) func initContainerService(c *cfg) { + // container wrapper that tries to invoke notary + // requests if chain is configured so wrap, err := wrapper.NewFromMorph(c.cfgMorph.client, c.cfgContainer.scriptHash, 0, wrapper.TryNotary()) fatalOnErr(err) + // container wrapper that always sends non-notary + // requests + wrapperNoNotary, err := wrapper.NewFromMorph(c.cfgMorph.client, c.cfgContainer.scriptHash, 0) + fatalOnErr(err) + cnrSrc := wrapper.AsContainerSource(wrap) eACLFetcher := &morphEACLFetcher{ @@ -76,7 +83,7 @@ func initContainerService(c *cfg) { resultWriter := &morphLoadWriter{ log: c.log, - cnrMorphClient: wrap, + cnrMorphClient: wrapperNoNotary, key: pubKey, }