[#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
|
@ -431,9 +431,18 @@ type reputationClient struct {
|
|||
}
|
||||
|
||||
func (c *reputationClient) submitResult(err error) {
|
||||
currEpoch := c.cons.netState.CurrentEpoch()
|
||||
sat := err == nil
|
||||
|
||||
c.cons.log.Debug(
|
||||
"writing local reputation values",
|
||||
zap.Uint64("epoch", currEpoch),
|
||||
zap.Bool("satisfactory", sat),
|
||||
)
|
||||
|
||||
prm := c.prm
|
||||
prm.SetSatisfactory(err == nil)
|
||||
prm.SetEpoch(c.cons.netState.CurrentEpoch())
|
||||
prm.SetSatisfactory(sat)
|
||||
prm.SetEpoch(currEpoch)
|
||||
|
||||
c.cons.trustStorage.Update(prm)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue