[#488] reputation: Initial Trusts using netMap

Make initial trust values depend on NetMap:
initial trust equals 1 / (`amount of storage nodes`).

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-05-04 13:10:41 +03:00 committed by Alex Vanin
parent d1db54acf8
commit 25ea5fea90
2 changed files with 19 additions and 4 deletions

View file

@ -38,7 +38,6 @@ import (
)
const EigenTrustAlpha = 0.1
const EigenTrustInitialTrust = 0.5
func initReputationService(c *cfg) {
staticClient, err := client.NewStatic(
@ -154,7 +153,7 @@ func initReputationService(c *cfg) {
Alpha: EigenTrustAlpha,
},
InitialTrustSource: intermediatereputation.InitialTrustSource{
Trust: reputation.TrustValueFromFloat64(EigenTrustInitialTrust),
NetMap: nmSrc,
},
IntermediateValueTarget: intermediateTrustRouter,
WorkerPool: c.cfgReputation.workerPool,