forked from TrueCloudLab/frostfs-node
[#1513] node: Encode node's public key into binary format once
Avoid per-iteration key encoding due to the immutability of the key. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
4574ba646d
commit
eb7b8bf7c4
2 changed files with 11 additions and 8 deletions
|
@ -288,7 +288,7 @@ func (c *cfg) netmapLocalNodeState(epoch uint64) (*netmapSDK.NodeInfo, error) {
|
|||
|
||||
nmNodes := nm.Nodes()
|
||||
for i := range nmNodes {
|
||||
if bytes.Equal(nmNodes[i].PublicKey(), c.key.PublicKey().Bytes()) {
|
||||
if bytes.Equal(nmNodes[i].PublicKey(), c.binPublicKey) {
|
||||
return &nmNodes[i], nil
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue