[#645] core: Define interface of the tool for working with netmap keys

Announced keys of storage nodes are required for many application components
to function.

Define a unified interface for the utility for working with public keys of
nodes. Add a method to check if the key has been advertised by the local
node in the application context.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-09-06 15:08:45 +03:00 committed by Alex Vanin
parent 22926e8f28
commit f14987c06d

7
pkg/core/netmap/keys.go Normal file
View file

@ -0,0 +1,7 @@
package netmap
// AnnouncedKeys is an interface of utility for working with announced public keys of the storage nodes.
type AnnouncedKeys interface {
// Checks if key was announced by local node.
IsLocalKey(key []byte) bool
}