[#1210] reputation: Improve debug logs
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
0adb29c035
commit
13af4e6046
17 changed files with 188 additions and 60 deletions
|
@ -1,10 +1,13 @@
|
|||
package intermediate
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/reputation"
|
||||
reputationcommon "github.com/nspcc-dev/neofs-node/pkg/services/reputation/common"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/reputation/eigentrust/storage/daughters"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// DaughterStorageWriterProvider is implementation of reputation.WriterProvider
|
||||
|
@ -24,6 +27,12 @@ type DaughterTrustWriter struct {
|
|||
}
|
||||
|
||||
func (w *DaughterTrustWriter) Write(t reputation.Trust) error {
|
||||
w.log.Debug("writing received daughter's trusts",
|
||||
zap.Uint64("epoch", w.ctx.Epoch()),
|
||||
zap.String("trusting_peer", hex.EncodeToString(t.TrustingPeer().Bytes())),
|
||||
zap.String("trusted_peer", hex.EncodeToString(t.Peer().Bytes())),
|
||||
)
|
||||
|
||||
w.storage.Put(w.ctx.Epoch(), t)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue