[#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>
remotes/fyrchik/cli-wallet-flag
Leonard Lyubich 2022-01-11 12:57:07 +03:00 committed by Alex Vanin
parent 0b0c61f4a5
commit fe29080ebb
1 changed files with 3 additions and 1 deletions

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)