[#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

@ -42,6 +42,8 @@ func NewFinalWriterProvider(prm FinalWriterProviderPrm, opts ...FinalWriterOptio
}
}
// FinalWriterProvider is implementation of reputation.eigentrust.calculator
// IntermediateWriterProvider interface. It inits FinalWriter.
type FinalWriterProvider struct {
prm FinalWriterProviderPrm
opts *finalWriterOptions
@ -55,9 +57,10 @@ func (fwp FinalWriterProvider) InitIntermediateWriter(
client: fwp.prm.Client,
l: fwp.opts.log,
}, nil
}
// FinalWriter is implementation of reputation.eigentrust.calculator IntermediateWriter
// interface that writes GlobalTrust to contract directly.
type FinalWriter struct {
privatKey *ecdsa.PrivateKey
pubKey []byte