diff --git a/netmap/config.yml b/netmap/config.yml index bf48768..e6a48b1 100644 --- a/netmap/config.yml +++ b/netmap/config.yml @@ -1,5 +1,5 @@ name: "NeoFS Netmap" -safemethods: ["innerRingList", "epoch", "netmap", "snapshot", "snapshotByEpoch", "config", "listConfig", "version"] +safemethods: ["innerRingList", "epoch", "netmap", "netmapCandidates", "snapshot", "snapshotByEpoch", "config", "listConfig", "version"] events: - name: AddPeer parameters: diff --git a/netmap/netmap_contract.go b/netmap/netmap_contract.go index 2a83d48..b2a3053 100644 --- a/netmap/netmap_contract.go +++ b/netmap/netmap_contract.go @@ -351,6 +351,13 @@ func Netmap() []storageNode { return getSnapshot(ctx, snapshot0Key) } +// NetmapCandidates returns all node candidates for next epoch and their +// status codes. +func NetmapCandidates() []netmapNode { + ctx := storage.GetReadOnlyContext() + return getNetmapNodes(ctx) +} + func Snapshot(diff int) []storageNode { var key string