[#473] Implement EigenTrust calculations
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0ec8bcf6b4
commit
a97e08cfd7
14 changed files with 1112 additions and 3 deletions
31
pkg/services/reputation/eigentrust/iteration.go
Normal file
31
pkg/services/reputation/eigentrust/iteration.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue