forked from TrueCloudLab/frostfs-node
[#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:
parent
0b0c61f4a5
commit
fe29080ebb
1 changed files with 3 additions and 1 deletions
|
@ -536,7 +536,9 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
||||||
|
|
||||||
var irf irFetcher
|
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)
|
irf = NewIRFetcherWithNotary(server.morphClient)
|
||||||
} else {
|
} else {
|
||||||
irf = NewIRFetcherWithoutNotary(server.netmapClient)
|
irf = NewIRFetcherWithoutNotary(server.netmapClient)
|
||||||
|
|
Loading…
Reference in a new issue