forked from TrueCloudLab/frostfs-node
[#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 <carpawell@nspcc.ru>
This commit is contained in:
parent
45aac7bb7f
commit
19e97e4d7c
1 changed files with 8 additions and 1 deletions
|
@ -41,9 +41,16 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
func initContainerService(c *cfg) {
|
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())
|
wrap, err := wrapper.NewFromMorph(c.cfgMorph.client, c.cfgContainer.scriptHash, 0, wrapper.TryNotary())
|
||||||
fatalOnErr(err)
|
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)
|
cnrSrc := wrapper.AsContainerSource(wrap)
|
||||||
|
|
||||||
eACLFetcher := &morphEACLFetcher{
|
eACLFetcher := &morphEACLFetcher{
|
||||||
|
@ -76,7 +83,7 @@ func initContainerService(c *cfg) {
|
||||||
|
|
||||||
resultWriter := &morphLoadWriter{
|
resultWriter := &morphLoadWriter{
|
||||||
log: c.log,
|
log: c.log,
|
||||||
cnrMorphClient: wrap,
|
cnrMorphClient: wrapperNoNotary,
|
||||||
key: pubKey,
|
key: pubKey,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue