From 3347e53cdeebc5a05af3ec6264ac9639e3af87bf Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Mon, 21 Sep 2020 15:56:21 +0300 Subject: [PATCH] [#151] sdk/netmap: Add public key getter for node Signed-off-by: Alex Vanin --- pkg/netmap/node_info.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/netmap/node_info.go b/pkg/netmap/node_info.go index 03a04b3..981a930 100644 --- a/pkg/netmap/node_info.go +++ b/pkg/netmap/node_info.go @@ -44,6 +44,11 @@ func (n Node) NetworkAddress() string { return n.InfoV2.GetAddress() } +// PublicKey returns public key of the node in bytes. +func (n Node) PublicKey() []byte { + return n.InfoV2.GetPublicKey() +} + // NodesFromV2 converts slice of v2 netmap.NodeInfo to a generic node slice. func NodesFromV2(infos []netmap.NodeInfo) Nodes { nodes := make(Nodes, len(infos))