[#488] reputation: Add commentaries

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-04-29 09:33:09 +03:00 committed by Alex Vanin
parent 2c8c9f69c8
commit eb74a9cafc
8 changed files with 38 additions and 13 deletions

View file

@ -14,11 +14,16 @@ import (
var ErrIncorrectContext = errors.New("could not write intermediate trust: passed context incorrect")
// ConsumerStorageWriterProvider is implementation of reputation.WriterProvider
// interface that provides ConsumerTrustWriter writer.
type ConsumerStorageWriterProvider struct {
Log *logger.Logger
Storage *consumerstorage.Storage
}
// ConsumerTrustWriter is implementation of reputation.Writer interface
// that writes passed consumer's Trust values to Consumer storage. After writing
// that values can be used in eigenTrust algorithm's iterations.
type ConsumerTrustWriter struct {
log *logger.Logger
storage *consumerstorage.Storage