From 53391f057e8b38c535425cc58cd5372f2ecb8753 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Tue, 13 Jul 2021 12:39:54 +0300 Subject: [PATCH] [#693] node/reputation: Log keys in hex format Signed-off-by: Pavel Karpy --- CHANGELOG.md | 1 + cmd/neofs-node/reputation/intermediate/storage.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f6014a0..8b9153397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Changelog for NeoFS Node - Do not require MainNet attributes in "Without MainNet" mode ([#663](https://github.com/nspcc-dev/neofs-node/issues/663)). - Stable alphabet list merge in Inner Ring governance ([#670](https://github.com/nspcc-dev/neofs-node/issues/670)). - User can specify only wallet section without node key ([#690](https://github.com/nspcc-dev/neofs-node/pull/690)). +- Log keys in hex format in reputation errors ([#693](https://github.com/nspcc-dev/neofs-node/pull/693)). ### Removed - Debug output of public key in Inner Ring log ([#689](https://github.com/nspcc-dev/neofs-node/pull/689)). diff --git a/cmd/neofs-node/reputation/intermediate/storage.go b/cmd/neofs-node/reputation/intermediate/storage.go index 2a7fb3d72..304de3401 100644 --- a/cmd/neofs-node/reputation/intermediate/storage.go +++ b/cmd/neofs-node/reputation/intermediate/storage.go @@ -1,6 +1,7 @@ package intermediate import ( + "encoding/hex" "fmt" "github.com/nspcc-dev/neofs-node/pkg/services/reputation" @@ -24,7 +25,7 @@ type ErrNoData struct { func (e *ErrNoData) Error() string { if e.hasDaughter { - return fmt.Sprintf("no data in %d epoch for peer: %s", e.epoch, string(e.daughter.Bytes())) + return fmt.Sprintf("no data in %d epoch for peer: %s", e.epoch, hex.EncodeToString(e.daughter.Bytes())) } return fmt.Sprintf("no daughter data in %d epoch", e.epoch)