From fe29080ebbab45e555fc911955966c8d1ddfbd65 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 11 Jan 2022 12:57:07 +0300 Subject: [PATCH] [#1025] ir: Read IR list from role management contract w/o mainchain If mainchain is disabled in IR config then the node should read inner ring list via role management contract. Use `NeoFSAlphabetList` method of morph client as IR lister if `withoutMainNet` flag is set in IR app. Signed-off-by: Leonard Lyubich --- pkg/innerring/innerring.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/innerring/innerring.go b/pkg/innerring/innerring.go index 79035c9a7..4d25b542c 100644 --- a/pkg/innerring/innerring.go +++ b/pkg/innerring/innerring.go @@ -536,7 +536,9 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error var irf irFetcher - if !server.mainNotaryConfig.disabled { + if server.withoutMainNet || !server.mainNotaryConfig.disabled { + // if mainchain is disabled we should use NeoFSAlphabetList client method according to its docs + // (naming `...WithNotary` will not always be correct) irf = NewIRFetcherWithNotary(server.morphClient) } else { irf = NewIRFetcherWithoutNotary(server.netmapClient)