[#488] storage/calculator: Make alpha dynamic

Delete reading `alpha` from env var. Cover
retrieving `alpha` behind interface in
intermediate calculator. Add TODO to decide
if it is necessary to receive that param from
global config or not.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-04-29 09:03:24 +03:00 committed by Alex Vanin
parent ad4a55468e
commit 2c8c9f69c8
6 changed files with 34 additions and 14 deletions

View file

@ -59,3 +59,9 @@ type IntermediateWriter interface {
type IntermediateWriterProvider interface {
InitIntermediateWriter(Context) (IntermediateWriter, error)
}
// AlphaProvider must provide information about required
// alpha parameter for eigen trust algorithm.
type AlphaProvider interface {
EigenTrustAlpha() (float64, error)
}