forked from TrueCloudLab/frostfs-api-go
[#265] pkg/reputation: Implement PeerToPeerTrust structure
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
269288119d
commit
a61c15b990
3 changed files with 135 additions and 0 deletions
|
@ -28,6 +28,14 @@ func GenerateTrust() *reputation.Trust {
|
|||
return v
|
||||
}
|
||||
|
||||
func GeneratePeerToPeerTrust() *reputation.PeerToPeerTrust {
|
||||
v := reputation.NewPeerToPeerTrust()
|
||||
v.SetTrustingPeer(GeneratePeerID())
|
||||
v.SetTrust(GenerateTrust())
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
func GenerateGlobalTrust() *reputation.GlobalTrust {
|
||||
v := reputation.NewGlobalTrust()
|
||||
v.SetManager(GeneratePeerID())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue