From f14987c06d7354abf5ef75bd45a1528cfc5e0149 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 6 Sep 2021 15:08:45 +0300 Subject: [PATCH] [#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 --- pkg/core/netmap/keys.go | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pkg/core/netmap/keys.go diff --git a/pkg/core/netmap/keys.go b/pkg/core/netmap/keys.go new file mode 100644 index 0000000000..5ad175b324 --- /dev/null +++ b/pkg/core/netmap/keys.go @@ -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 +}