[#473] Implement EigenTrust calculations

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-04-10 15:02:51 +03:00 committed by Alex Vanin
parent 0ec8bcf6b4
commit a97e08cfd7
14 changed files with 1112 additions and 3 deletions

View file

@ -0,0 +1,31 @@
package eigentrust
import (
"github.com/nspcc-dev/neofs-node/pkg/services/reputation"
)
type EpochIteration struct {
e uint64
i uint32
}
func (x EpochIteration) Epoch() uint64 {
return x.e
}
func (x *EpochIteration) SetEpoch(e uint64) {
x.e = e
}
func (x EpochIteration) I() uint32 {
return x.i
}
func (x *EpochIteration) SetI(i uint32) {
x.i = i
}
type IterationTrust struct {
EpochIteration
reputation.Trust
}