[#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 <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-01-11 12:57:07 +03:00 committed by Alex Vanin
parent 0b0c61f4a5
commit fe29080ebb

View file

@ -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)